Skip to content

Functions

Explore hooks by category from the left sidebar and jump into implementation details quickly.

Core
Sort by

Sensors

onElementRemoval-Callback when a node is disconnected
onKeyStroke-Subscribe to key events with a filter
onLongPress-Pointer long-press handlers
onStartTyping-After idle, detect next printable keystroke
useBattery-Battery status from getBattery
useDeviceMotion-Track device motion
useDeviceOrientation-Track device orientation
useDevicePixelRatio-Track device pixel ratio
useDevicesList-List media devices
useDisplayMedia-Capture display media stream
useElementByPoint-Resolve element by viewport point
useElementHover-Track hover state for an element
useFocus-Track focus state for one element
useFocusWithin-Track focus within a container
useFps-Estimate current frames per second
useGeolocation-Track browser geolocation
useIdle-Detect user inactivity
useInfiniteScroll-Trigger callback near scroll end
useIntersectionObserver-Track element visibility in viewport
useKeyModifier-Track pressed modifier keys
useMagicKeys-Track pressed keyboard keys
useMouse-Track viewport mouse coordinates
useMousePressed-Track mouse pressed state
useMutationObserver-Observe DOM mutations
useNavigatorLanguage-Track active browser language
useNetwork-Track network connection metadata
useOnline-Track browser online status
usePageLeave-Trigger callback when cursor leaves page
useParallax-Compute parallax transform from pointer
usePointer-Track pointer coordinates and pressed state
useResizeObserver-Track element size changes
useScroll-Track window scroll offsets
useSpeechRecognition-Speech-to-text recognition state
useSpeechSynthesis-Text-to-speech playback controls
useSwipe-Detect touch swipe direction
useTextSelection-Track current text selection
useUserMedia-Manage getUserMedia stream lifecycle

Released under the MIT License.