Hooks & Utilities
v1.0.0Added in 1.0.0
SSR-safe hooks for media queries, phone widths, touch screens and the current Tailwind breakpoint.
Resize the window, switch to the phone frame or change your system settings: the readout follows along live. Type any media query into the playground to test it.
npx wingo-ui@latest add use-media-queryNo dependencies beyond React.
useBreakpoint()
useIsMobile()falseBelow 768px: overlays become sheetsuseIsTouch()falseA finger is the main pointerhover: hoverfalseMouse or trackpad hover existsreduced motionfalseThe system asks for less motiondark schemefalseThe system theme is dark(min-width: 1024px)falseYour query from the playground