H
preetsuthar17/HextaUI/hooks
useAutosizeuse-autosizeGrows a textarea with what you write between its minimum and maximum height, animating each change without ever touching the text.
useButtonFeedbackuse-button-feedbackRuns an async action through loading, success and error, skipping the spinner for fast requests and holding an error while you read it.
useComposedRefuse-composed-refKeeps a ref to your own element while still forwarding it to whatever ref the parent passed in.
useDelayedLoadinguse-delayed-loadingShows a loading state only when work is actually slow, then keeps it up long enough that it never flickers.
useHeldKeysuse-held-keysThe keys someone is holding down right now, shared by every subscriber through a single set of window listeners.
useInvalidShakeuse-invalid-shakeShakes a form control when a submit attempt finds it invalid, and never while someone is still typing.
useMergedRefuse-merged-refCombines any number of callback and object refs into one, with React 19 ref cleanup for each of them.
usePaginationuse-paginationTurns a page and a page count into the list of pages and ellipses to render, keeping its length steady as the page moves.
useTodayuse-todayToday's date that rolls over at midnight and when the tab comes back, without a hydration mismatch.

Select a component to view its code

Click on any item in the sidebar to get started

Select a component to view its information
useAutosizeuse-autosizeGrows a textarea with what you write between its minimum and maximum height, animating each change without ever touching the text.
useButtonFeedbackuse-button-feedbackRuns an async action through loading, success and error, skipping the spinner for fast requests and holding an error while you read it.
useComposedRefuse-composed-refKeeps a ref to your own element while still forwarding it to whatever ref the parent passed in.
useDelayedLoadinguse-delayed-loadingShows a loading state only when work is actually slow, then keeps it up long enough that it never flickers.
useHeldKeysuse-held-keysThe keys someone is holding down right now, shared by every subscriber through a single set of window listeners.
useInvalidShakeuse-invalid-shakeShakes a form control when a submit attempt finds it invalid, and never while someone is still typing.
useMergedRefuse-merged-refCombines any number of callback and object refs into one, with React 19 ref cleanup for each of them.
usePaginationuse-paginationTurns a page and a page count into the list of pages and ellipses to render, keeping its length steady as the page moves.
useTodayuse-todayToday's date that rolls over at midnight and when the tab comes back, without a hydration mismatch.

Select a component to view its code

Click on any item in the sidebar to get started

Select a component to view its information
9 items
GitHubRB@rbadillap