Browser Hooks
DOM, viewport, media, lifecycle, and browser event hooks.
Hooks for browser APIs, DOM events, viewport state, and client lifecycle behavior.
Hooks
useClickAnyWhere
Run a handler whenever the document is clicked.
useEventCallback
Create a stable callback that always sees the latest state.
useEventListener
Attach typed listeners to window, document, or element refs.
useHover
Track whether an element ref is currently hovered.
useIntersectionObserver
Observe when an element enters or leaves a viewport/root.
useIsClient
Detect whether code is running on the client.
useIsMounted
Check whether the component is still mounted.
useIsomorphicLayoutEffect
Use layout effect on client and effect on server.
useMediaQuery
Subscribe to media query match state.
useOnClickOutside
Trigger handlers when interaction happens outside refs.
useResizeObserver
Measure element size changes with ResizeObserver.
useScreen
Read
window.screen values reactively.useScript
Load external scripts and track loading status.
useScrollLock
Lock and unlock scrolling on body or target elements.
useUnmount
Run cleanup logic when a component unmounts.
useWindowSize
Track viewport width and height.