UI & InteractionNewuseClickOutsideDetects clicks outside of a target element.Option 1Option 2Option 3
BrowserNewuseMediaQueryListens for media query changes and returns a boolean.< 640px640-1024px> 1024px
UtilitiesNewuseDebouncedCallbackCreates a debounced version of a callback function with cancellation, flush, and max-wait controls.Input events4 callscallback()1 execution300ms
UI & InteractionNewusePreventBodyScrollPrevents background scrolling with layout shift compensation and iOS Safari support.Locked
UI & InteractionNewuseScrollPositionTracks scroll coordinates and direction in real time for the window or a specific scrollable element.y: 420
BrowserNewuseNetworkTracks the browser's online and offline status and provides available network connection details such as connection type, downlink speed, and round-trip time.ONLINE4G · 24 Mbps
UI & InteractionNewusePageLeaveDetects when the cursor leaves the viewport and provides exit-intent detection with configurable boundary filtering and trigger frequency.EXIT INTENT
StateNewuseIsFirstRenderDetermines whether the current render is the initial mount, returning true on the first render and false on subsequent re-renders.trueInitialfalseRe-render
StateNewuseStateHistoryProvides state management with undo, redo, and time-travel capabilities through a chronological history of state snapshots.Current state301234Undopointer: 3Redo
UI & InteractionNewuseSelectionManages single, multi, and batch selection states with Set-based O(1) lookups and range selection.2 items
UI & InteractionNewusePaginationControls dataset pagination metrics, slice bounds, and UI navigation range with ellipsis handling.12•••9Page 2/9
StateNewuseMapA reactive Map instance synchronized with React state that triggers re-renders on mutation.Map<K, V>"theme""dark""count"42"auth"truesize: 3
StateNewuseListStateManages array state with declarative helper methods for insertion, removal, reordering, and item transformations.useListStateCRUD / Reorder
StateNewuseDisclosureManages boolean open/close state for modals, dialogs, drawers, and collapsibles with memoized handlers.dialog.modalclose()openisOpen: true