SAV Design/useIsMobile

useIsMobile

matchMedia hook for the 768px breakpoint used by the sidebar.

UI primitivesregistry:hook

Install

npx shadcn@latest add @sav/use-mobile

Needs "@sav": "https://design.sasv.ch/r/{name}.json" under registries in components.json. Direct URL: /r/use-mobile.json.

Preview

useIsMobile() → false (resize below 768 px to flip)

Files

  • registry/sav/hooks/use-mobile.ts→ @hooks/use-mobile.ts

Dependencies

Registry items

—

npm packages

—