{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "use-mobile",
  "description": "A hook that reports whether the viewport is below the 768px mobile breakpoint.",
  "files": [
    {
      "path": "hooks/use-mobile.ts",
      "content": "import * as React from \"react\"\n\nconst MOBILE_BREAKPOINT = 768\n\nexport function useIsMobile() {\n  const subscribe = React.useCallback((onStoreChange: () => void) => {\n    const media = window.matchMedia(\n      `(max-width: ${MOBILE_BREAKPOINT - 1}px)`\n    )\n    media.addEventListener(\"change\", onStoreChange)\n    return () => media.removeEventListener(\"change\", onStoreChange)\n  }, [])\n\n  const getSnapshot = React.useCallback(\n    () => window.innerWidth < MOBILE_BREAKPOINT,\n    []\n  )\n\n  return React.useSyncExternalStore(subscribe, getSnapshot, () => false)\n}\n",
      "type": "registry:hook"
    }
  ],
  "type": "registry:hook"
}