next-mobile-check
v1.0.1
Published
A lightweight Next.js utility to detect mobile devices and restrict access to pages or components.
Readme
next-mobile-check
A lightweight Next.js utility to detect mobile devices and restrict access to pages or components.
Features
useIsMobile()hook: Returns{ isMobile: boolean }for conditional rendering.MobileGuardcomponent: Wrap any page or component to show only on mobile devices with optional fallback UI.- Works with Next.js 13+ (app directory) and Chakra UI.
Installation
npm install next-mobile-check
OR
```bash
yarn add next-mobile-check