Use mobile
GitHubReact hook that reports whether the viewport is narrower than the mobile breakpoint.
Installation
bash
pnpm dlx shadcn@latest add @cs/use-mobileUsage
tsx
import { useIsMobile } from "@/hooks/cs/use-mobile";tsx
const isMobile = useIsMobile();API Reference
useIsMobile
Reports whether the viewport is narrower than the mobile breakpoint.