@hyperfrontend/ui-utils/mobilemobile
Mobile-device detection helper.
isMobileDevice() returns true when the current runtime appears to be a mobile browser based on user-agent and feature signals. Use it to gate behavior that only makes sense on touch-first devices (gesture listeners, larger hit-targets, mobile-only UI) without depending on a full UA-parsing library.
API Reference
ƒ Functions
Detects whether the current device is a mobile device based on the user agent.
Returns
booleanTrue if the device is mobile, false otherwise
Example
Detecting mobile device
if (isMobileDevice()) {
showMobileLayout()
} else {
showDesktopLayout()
}