Docs
/
detections

Detections

Client-side detections for various user and browser information. Perfect for personalisation, analytics or debugging weird and wonderful bugs. You will need to add a listeners for reactivity.

detectScrollPosition

Link Copied!

Detect the current scroll position of the window

{ "x": 0, "y": 0 }
Result

detectMousePosition

Link Copied!

Detect the absolute mouse position with the page

{ "x": 0, "y": 0 }
Result
Don't forget to add a mousemove event listener to the window

detectRelativeMousePosition

Link Copied!

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

{ "x": 0, "y": 0 }
Result
Don't forget to add a mousemove event listener to the window

detectWindowSize

Link Copied!

Detect the browser's window size

{ "width": 0, "height": 0 }
Result

detectScreenSize

Link Copied!

Detect the screen or monitor size

Result

detectActiveBrowser

Link Copied!

Detect if the browser window is currently active or hidden.

false
Result

detectColorScheme

Link Copied!

Detect the current color scheme (Light or Dark)

Result

detectUserTimezone

Link Copied!

Detect the current user's Timezone

Result

detectBreakpoint

Link Copied!

Detect the current breakpoint based on Tailwind CSS breakpoints

Result
Add a listener to the window resize event to detect changes

detectContainerBreakpoint

Link Copied!

Detect any container breakpoint based on Tailwind CSS breakpoints

Result
Add a listener to the window resize event to detect changes

detectNetworkStatus

Link Copied!

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

Result

detectUrl

Link Copied!

Returns the current URL

Result

detectUrlPath

Link Copied!

Returns the path of the current URL as an array or string

Result

detectUrlParams

Link Copied!

Returns a value from the URL by name

Result

detectUrlHash

Link Copied!

Returns a value from the URL hash by name

Result

detectHost

Link Copied!

Returns the current host or domain name from the URL

Result

detectHostName

Link Copied!

Returns the current hostname from the URL

Result

detectPort

Link Copied!

Returns the current port

Result