Loading...
Loading...
Apply shadcn-hooks React hooks where appropriate to build concise, maintainable React features.
npx skill4agent add debbl/shadcn-hooks shadcn-hooksInvocationAUTOEXTERNAL# Install a single hook (recommended)
npx shadcn@latest add @hooks/use-boolean
# Install multiple hooks at once
npx shadcn@latest add @hooks/use-boolean @hooks/use-mount @hooks/use-debouncenpm install shadcn-hooksWhen using the shadcn CLI, import from the local path (e.g.). When using the npm package, import fromimport { useBoolean } from "@/hooks/use-boolean"(e.g."shadcn-hooks").import { useBoolean } from "shadcn-hooks"
DescriptionReference./references| Function | Description | Invocation |
|---|---|---|
| Boolean state with | AUTO |
| Supports both controlled and uncontrolled component patterns | AUTO |
| Counter with | AUTO |
| Debounced reactive value | AUTO |
| State with a | AUTO |
| Throttled reactive value | AUTO |
| Toggle between two values with utility actions | AUTO |
| Function | Description | Invocation |
|---|---|---|
| Memoized factory with deep dependency comparison | AUTO |
| | AUTO |
| Ref that always holds the latest value | AUTO |
| Prevents concurrent execution of an async function | AUTO |
| Stable function reference that never changes identity | AUTO |
| Returns the previous value of a state | AUTO |
| Function | Description | Invocation |
|---|---|---|
| Debounced | AUTO |
| Debounced function with | AUTO |
| | AUTO |
| | AUTO |
| Ponyfill for React 19's | AUTO |
| | AUTO |
| Interval timer with auto-cleanup | AUTO |
| Returns | AUTO |
| | AUTO |
| Runs a callback only on component mount | AUTO |
| Throttled | AUTO |
| Throttled function with | AUTO |
| Timeout timer with auto-cleanup | AUTO |
| Runs cleanup on component unmount | AUTO |
| Returns a function that forces component re-render | AUTO |
| | AUTO |
| Function | Description | Invocation |
|---|---|---|
| Track the currently focused element | AUTO |
| Reactive battery level and charging information | AUTO |
| Listen to click events anywhere on the document | AUTO |
| Detect clicks outside of target element(s) | AUTO |
| Reactive Clipboard API with read/write support | AUTO |
| Reactive document visibility state | AUTO |
| Reactive element size via ResizeObserver | AUTO |
| Declarative event listener with auto-cleanup | AUTO |
| Reactive FPS (frames per second) measurement | AUTO |
| Reactive Fullscreen API | AUTO |
| Reactive | AUTO |
| Reactive hover state of an element | AUTO |
| Track element visibility via IntersectionObserver | AUTO |
| Reactive CSS media query matching | AUTO |
| Reactive online/offline network status | AUTO |
| Reactive network connection information | AUTO |
| Lock/unlock scroll on a target element | AUTO |
| Reactive text selection state with bounding rect | AUTO |
| Function | Description | Invocation |
|---|---|---|
| Logs which props changed between renders (debug only) | AUTO |
| Function | Description | Invocation |
|---|---|---|
| Model Context Protocol client hook from | EXTERNAL |
| Data fetching hook from | EXTERNAL |
| Scroll-stick behavior from | EXTERNAL |
| Data fetching hook from | EXTERNAL |