Getting Started
Learn about all of Prismane's hooks. Explore all of the hooks, ordered by their type.User Interface
useAnimationuseAnimation hook provides a simple way to manage animation state in your components.useDimensionsuseDimensions hook provides a simple way to get the dimensions of an element.useDraggableuseDraggable hook provides a simple way to drag elements.useFocusTrapuseFocusTrap hook provides a simple way to trap the user's focus.useIdleuseIdle hook provides a simple way to handle when a client is active and idle.useKeyboardShortcutuseKeyboardShortcut hook provides a simple way to handle key combinations.useMediaQueryuseMediaQuery hook provides a simple way to handle media queries.useOutsideClickuseOutsideClick hook provides a simple way to handle a click out of the element's constraints.usePresenceusePresence hook provides a way to animate an element, before removing it from the DOM.useScrolluseScroll hook provides a simple way to simplify handling scrolling.
State Management
useCounteruseCounter hook provides a simple way to manage a stateful counter.useCopyToClipboarduseCopyToClipboard hook provides a copyToClipboard method to save a string in the clipboard and the copiedValue value (default: null).useDebounceuseDebounce hook provides a simple way to debounce heavy calculations.useFormuseForm hook provides a simple way to handle forms.useIntervaluseInterval hook provides a simple way to handle complex intervals.useLocalStorageuseLocalStorage hook provides a simple way to handle saving data to the localStorage.useMemoizationuseMemoization hook provides a simple way to memoize expensive calculations.usePrevioususePrevious hook provides a simple way to handle saving the previous value of a variable.useSearchuseSearch hook provides a simple way to search through different types of data.useSortinguseSorting hook provides a simple way of sorting big chunks of data by key and direction.useToggleuseToggle hook provides a simple way to handle toggling between a set of values.
Miscellaneous
useEmulatedFieldChangeuseEmulatedFieldChange hook provides a simple way to emulate field change events.useIduseId hook provides a simple way to create unique ids.useLocalizationuseLocalization hook provides a simple way to handle localization and dynamic translation.useNetworkStatususeNetworkStatus hook provides a simple way of handling changes in the internet connection.useThemeModeValueuseThemeModeValue hook simplifies the logic for using two style properties for dark and light modes.