This component no longer exists. It was in ondo-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-09 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
use-mobile
ondo-ui/use-mobileRemovedHook
A hook that reports whether the viewport is below the 768px mobile breakpoint.
Install it
npx shadcn@latest add https://ui.ondo.dou.so/r/use-mobile.jsonSource
1import * as React from "react"23const MOBILE_BREAKPOINT = 76845export function useIsMobile() {6 const subscribe = React.useCallback((onStoreChange: () => void) => {7 const media = window.matchMedia(8 `(max-width: ${MOBILE_BREAKPOINT - 1}px)`9 )10 media.addEventListener("change", onStoreChange)11 return () => media.removeEventListener("change", onStoreChange)12 }, [])1314 const getSnapshot = React.useCallback(15 () => window.innerWidth < MOBILE_BREAKPOINT,16 []17 )1819 return React.useSyncExternalStore(subscribe, getSnapshot, () => false)20}
