useIdle
Report when the user has not moved the mouse, typed, scrolled or touched the page for a while. Use it to pause work, dim a screen or warn before a session expires.
- Level
- Intermediate
- Since
- v1.0.0
import {useIdle} from '@zenuilabs/react-hooks';Loading demo_
More in Browser & Device
Browser & DeviceBasicuseBatteryReads the battery level and charging state from the Battery Status API. Use it to pause heavy work or warn the user when the battery is low.Browser & DeviceIntermediateuseBreakpointReports the active min-width breakpoint using matchMedia, so by default components re-render only when a breakpoint is crossed. Opt in to live width tracking when you need the exact width. Hydration safe, with custom breakpoint maps.Browser & DeviceIntermediateuseColorSchemeStores a light, dark or system color scheme preference and resolves it against the OS setting. The choice persists to localStorage, syncs across tabs, and is hydration safe.