All itemsHooks · 21
I
(21)
01useClickOutside
UI

Detects clicks outside of a target element.

02useMediaQuery
BROWSER

Listens for media query changes and returns a boolean.

03useCopyToClipboard
UTILITY

Copies text to clipboard with feedback.

04useIntersectionObserver
PERF

Triggers when an element enters or leaves the viewport.

05useDebounce
UTILITY

Debounces a value or function for better performance.

06useDebouncedCallback
UTILITY

Creates a debounced version of a callback function with cancellation, flush, and max-wait controls.

07useLocalStorage
BROWSER

Syncs state with localStorage across browser sessions.

08useToggle
STATE

Toggles a boolean state value with memoized handlers.

09usePrevious
STATE

Stores previous value of a state or prop across renders.

10useHover
UI

Tracks hover state of a target element with optional delay.

11usePreventBodyScroll
UI

Prevents background scrolling with layout shift compensation and iOS Safari support.

12useScrollPosition
UI

Tracks scroll coordinates and direction in real time for the window or a specific scrollable element.

13useNetwork
BROWSER

Tracks the browser's online and offline status and provides available network connection details such as connection type, downlink speed, and round-trip time.

14usePageLeave
UI

Detects when the cursor leaves the viewport and provides exit-intent detection with configurable boundary filtering and trigger frequency.

15useIsFirstRender
STATE

Determines whether the current render is the initial mount, returning true on the first render and false on subsequent re-renders.

16useStateHistory
STATE

Provides state management with undo, redo, and time-travel capabilities through a chronological history of state snapshots.

17useSelection
UI

Manages single, multi, and batch selection states with Set-based O(1) lookups and range selection.

18usePagination
UI

Controls dataset pagination metrics, slice bounds, and UI navigation range with ellipsis handling.

19useMap
STATE

A reactive Map instance synchronized with React state that triggers re-renders on mutation.

20useListState
STATE

Manages array state with declarative helper methods for insertion, removal, reordering, and item transformations.

21useDisclosure
STATE

Manages boolean open/close state for modals, dialogs, drawers, and collapsibles with memoized handlers.

Command Palette

Quick search and commands navigation