Docs
/
detections

Detections

Client-side detections for various user and browser information. Perfect for personalisation, analytics or debugging weird and wonderful bugs. Please note we're working on making our examples reactive! 🚀

detectScrollPosition

Link Copied!

Detect the current scroll position of the window

detectScrollPosition()

detectMousePosition

Link Copied!

Detect the absolute mouse position with the page

Don't forget to add a mousemove event listener to the window
detectMousePosition(event: MouseEvent)

detectRelativeMousePosition

Link Copied!

Detect the relative mouse position with the window size and returns a percentage value

Don't forget to add a mousemove event listener to the window
detectRelativeMousePosition(event: MouseEvent)

detectWindowSize

Link Copied!

Detect the browser's window size

detectWindowSize()

detectScreenSize

Link Copied!

Detect the screen or monitor size

detectScreenSize()

detectActiveBrowser

Link Copied!

Detect if the browser window is currently active or hidden.

detectActiveBrowser()

detectColorScheme

Link Copied!

Detect the current color scheme (Light or Dark)

detectColorScheme()

detectUserTimezone

Link Copied!

Detect the current user's Timezone

detectUserTimezone()

detectDeviceOrientation

Link Copied!

Detect the currect device orientation

detectDeviceOrientation()

detectBreakpoint

Link Copied!

Detect the current breakpoint based on Tailwind CSS breakpoints

detectBreakpoint()

detectNetworkStatus

Link Copied!

Detect the current network status of the user (Online or Offline)

detectNetworkStatus()

detectUrl

Link Copied!

Returns the current URL

detectUrl()

detectUrlPath

Link Copied!

Returns the path of the current URL in an array

detectUrlPath()

detectUrlParams

Link Copied!

Returns a value from the URL by name

detectUrlParams()

detectUrlHash

Link Copied!

Returns a value from the URL hash by name

detectUrlHash()

detectHost

Link Copied!

Returns the current host or domain name from the URL

detectHost()

detectHostName

Link Copied!

Returns the current hostname from the URL

detectHostName()

detectPort

Link Copied!

Returns the current port

detectPort()