useDebouncedCallback
Debounces a callback function. The callback will only execute after the specified delay has passed since the last invocation. Also exposes a progress and isInProgress state for building progress indicators (e.g. search loading bars).
useDebouncedValue
Debounces a reactive value. The returned value only updates after the specified delay has passed since the last change. Also exposes progress and isInProgress for building loading indicators.
useDelayUnmount
Delays the unmounting of a component by a specified duration, allowing exit animations to complete before the element is removed from the DOM. Used internally by the Popover component.
useFocusTrap
Traps keyboard focus within a container element by cycling Tab navigation between the first and last focusable items. Optionally auto-focuses the first element when activated. Used internally by the Popover component.
useInfiniteScroll
Handles infinite scrolling with IntersectionObserver. Attach the returned refs to a scroll container and a loader element - the hook triggers onLoadMore when the loader becomes visible. Used internally by Select and Dropdown.Section.
useLocalStorage
A useState-like hook that persists state to localStorage. The value is automatically serialized/deserialized as JSON. Falls back to the initial value if the storage key is missing or parsing fails.
useMutationObserver
Observes DOM mutations (child additions/removals) within a container using MutationObserver. The callback fires whenever the subtree changes.
usePositionObserver
Continuously monitors an element's viewport position (top/left) using requestAnimationFrame and fires a callback when the position changes. Useful for detecting movement caused by DOM changes outside of the element's subtree.
usePrevValue
Tracks the previous value of a state or prop. Returns undefined on the first render, then the value from the previous render cycle. Used internally by the Popover component.
usePreventBodyScroll
Prevents the document body from scrolling while active by setting overflow-y: hidden. Restores the original overflow value on cleanup. Used internally by the Popover component for modal-like overlays.
useResizeObserver
Observes an element's size changes using the ResizeObserver API. The callback fires whenever the observed element's dimensions change. Used internally by the Popover component for dynamic repositioning.
useWindowResize
Runs a callback whenever the browser window is resized. The callback ref is kept stable so the event listener is only attached once. Used internally by the Popover component for repositioning.