Is Mobile
Responsive media-query hook that returns true below a breakpoint. It uses useSyncExternalStore so server and client snapshots stay predictable.
Installation
dgadd is not public on npm yet. Until the first release, pack @diffgazer/add from the repository and install that tarball into this app, which is what puts dgadd on pnpm exec.
The hosted registry is not public yet because r.b4r7.dev does not resolve. Use this source checkout or a local registry preview until the endpoint returns 200.
Diffgazer packages are not yet published to npm. Until the first release, pack @diffgazer/ui and @diffgazer/keys from the repository and install those tarballs.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS once packages are available.
Parameters
Returns
Notes
Server Snapshot
Server rendering returns false. Use this hook for responsive enhancement after hydration, not for markup that must be identical across breakpoints before hydration.
Media Query
The subscribed query is (max-width: breakpoint - 1px). With the default 1024 breakpoint, 1023px and below return true.
Owner Window
By default the hook uses the current global window. Pass a Window or an element ref to classify and subscribe against another document's viewport.
Source
Highlighted source loads after this disclosure opens. Browse the source repository.