@shadcnhooks
A growing TypeScript-first React hooks collection distributed through the shadcn registry, built for React 19+ with SSR compatibility and zero or minimal external dependencies. Each hook is individually installable (e.g., npx shadcn@latest add @shadcnhooks/use-counter). Documented hooks include use-counter, use-boolean, and others following the shadcn copy-paste philosophy. Tree-shakeable; no lock-in. Use for: adding well-tested, typed utility hooks — state management, toggles, timers, event listeners — directly into a project as owned source files rather than a package dependency.
Install this registry
npx shadcn@latest add https://shadcn-hooks.com/r/registry.json pnpm dlx shadcn@latest add https://shadcn-hooks.com/r/registry.json bunx shadcn@latest add https://shadcn-hooks.com/r/registry.json curl -s https://shadcn-hooks.com/r/registry.json Components
58 totalA library that checks if the code is running in a browser.
npx shadcn@latest add https://shadcn-hooks.com/r/is-browser.json A hook to create an effect with a target.
npx shadcn@latest add https://shadcn-hooks.com/r/create-effect-with-target.json Create a context object.
npx shadcn@latest add https://shadcn-hooks.com/r/create-context.json A hook to log the props that changed in a component
npx shadcn@latest add https://shadcn-hooks.com/r/use-why-did-you-update.json A hook to run an effect only when the component updates
npx shadcn@latest add https://shadcn-hooks.com/r/use-update-effect.json A hook to force a component to re-render
npx shadcn@latest add https://shadcn-hooks.com/r/use-update.json A hook to run a function when the component unmounts
npx shadcn@latest add https://shadcn-hooks.com/r/use-unmount.json A hook to toggle a value
npx shadcn@latest add https://shadcn-hooks.com/r/use-toggle.json A hook to reactively manage document.title
npx shadcn@latest add https://shadcn-hooks.com/r/use-title.json A hook that creates a timeout.
npx shadcn@latest add https://shadcn-hooks.com/r/use-timeout.json A hook to throttle a function
npx shadcn@latest add https://shadcn-hooks.com/r/use-throttle-fn.json A hook to throttle an effect
npx shadcn@latest add https://shadcn-hooks.com/r/use-throttle-effect.json A hook to throttle a value
npx shadcn@latest add https://shadcn-hooks.com/r/use-throttle.json A hook to get the text selection and its bounding rect from an element
npx shadcn@latest add https://shadcn-hooks.com/r/use-text-selection.json A hook to get the latest value of a variable
npx shadcn@latest add https://shadcn-hooks.com/r/use-swr.json A lightweight React Hook intended mainly for AI chat applications, for smoothly sticking to bottom of messages
npx shadcn@latest add https://shadcn-hooks.com/r/use-stick-to-bottom.json A hook to lock the scroll of the body
npx shadcn@latest add https://shadcn-hooks.com/r/use-scroll-lock.json A hook to reset a state
npx shadcn@latest add https://shadcn-hooks.com/r/use-reset-state.json useQuery is a hook that allows you to fetch data from an API and cache the results.
npx shadcn@latest add https://shadcn-hooks.com/r/use-query.json A hook to get the previous value of a variable
npx shadcn@latest add https://shadcn-hooks.com/r/use-previous.json A hook to detect the current operating system
npx shadcn@latest add https://shadcn-hooks.com/r/use-os.json A hook to get the network state
npx shadcn@latest add https://shadcn-hooks.com/r/use-network.json A hook to track mouse position with optional touch support
npx shadcn@latest add https://shadcn-hooks.com/r/use-mouse.json A hook to run a function when the component mounts
npx shadcn@latest add https://shadcn-hooks.com/r/use-mount.json A hook to declare a memoized function
npx shadcn@latest add https://shadcn-hooks.com/r/use-memoized-fn.json A hook to get the latest value of a variable
npx shadcn@latest add https://shadcn-hooks.com/r/use-mcp.json A hook to lock a function until the previous promise is resolved
npx shadcn@latest add https://shadcn-hooks.com/r/use-lock-fn.json A hook to get the latest value of a variable
npx shadcn@latest add https://shadcn-hooks.com/r/use-latest.json A hook to use layout effect on the client side
npx shadcn@latest add https://shadcn-hooks.com/r/use-isomorphic-layout-effect.json A hook to check if the user is online
npx shadcn@latest add https://shadcn-hooks.com/r/use-is-online.json A hook to check if the media query matches
npx shadcn@latest add https://shadcn-hooks.com/r/use-is-match-media.json A hook to check if the component is hydrated
npx shadcn@latest add https://shadcn-hooks.com/r/use-is-hydrated.json A hook that creates an interval.
npx shadcn@latest add https://shadcn-hooks.com/r/use-interval.json A hook to check if an element is in the viewport
npx shadcn@latest add https://shadcn-hooks.com/r/use-in-viewport.json A hook to check if the mouse is hovering over an element
npx shadcn@latest add https://shadcn-hooks.com/r/use-hover.json A hook to get current hash
npx shadcn@latest add https://shadcn-hooks.com/r/use-hash.json A hook to manage fullscreen state
npx shadcn@latest add https://shadcn-hooks.com/r/use-fullscreen.json A hook to calculate the FPS
npx shadcn@latest add https://shadcn-hooks.com/r/use-fps.json A hook to attach event listeners to DOM elements, the window, or media query lists.
npx shadcn@latest add https://shadcn-hooks.com/r/use-event-listener.json A hook to track an element's width and height
npx shadcn@latest add https://shadcn-hooks.com/r/use-element-size.json A hook to create an effect with a target element that re-runs when the target or dependencies change
npx shadcn@latest add https://shadcn-hooks.com/r/use-effect-with-target.json A hook to declare an effect event
npx shadcn@latest add https://shadcn-hooks.com/r/use-effect-event.json A hook to track the document visibility state
npx shadcn@latest add https://shadcn-hooks.com/r/use-document-visibility.json A hook to use a deep compare layout effect
npx shadcn@latest add https://shadcn-hooks.com/r/use-deep-compare-layout-effect.json A hook to use a deep compare effect
npx shadcn@latest add https://shadcn-hooks.com/r/use-deep-compare-effect.json A hook to debounce a function
npx shadcn@latest add https://shadcn-hooks.com/r/use-debounce-fn.json A hook to debounce an effect
npx shadcn@latest add https://shadcn-hooks.com/r/use-debounce-effect.json A hook to debounce a value
npx shadcn@latest add https://shadcn-hooks.com/r/use-debounce.json A hook like useEffect but with a custom compare function
npx shadcn@latest add https://shadcn-hooks.com/r/use-custom-compare-effect.json A hook to create a value only once
npx shadcn@latest add https://shadcn-hooks.com/r/use-creation.json A hook that creates a counter.
npx shadcn@latest add https://shadcn-hooks.com/r/use-counter.json A hook to manage a controllable value
npx shadcn@latest add https://shadcn-hooks.com/r/use-controllable-value.json A hook to copy text to clipboard
npx shadcn@latest add https://shadcn-hooks.com/r/use-clipboard.json A hook to click away from an element
npx shadcn@latest add https://shadcn-hooks.com/r/use-click-away.json A hook to click anywhere
npx shadcn@latest add https://shadcn-hooks.com/r/use-click-any-where.json A hook to toggle a boolean value
npx shadcn@latest add https://shadcn-hooks.com/r/use-boolean.json A hook to monitor battery information
npx shadcn@latest add https://shadcn-hooks.com/r/use-battery.json A hook to track the currently focused element in the document
npx shadcn@latest add https://shadcn-hooks.com/r/use-active-element.json