React Hooks
A collection of production-ready React hooks for storage, forms, real-time communication, device access, and more. Type-safe, SSR-compatible, and designed for modern applications.
A collection of Type-Safe, SSR-Compatible React Hooks organized by category. Install any hook with a single command.
Storage
Hooks for persisting data in the browser.
| Hook | Description |
|---|---|
| useLocalStorageState | Sync state with localStorage (persistent) |
| useSessionStorageState | Sync state with sessionStorage (per-tab) |
| useIndexedDB | Store large data in IndexedDB |
| useFileSystem | Read/write files to local disk |
Form
Hooks for building forms and handling user input.
| Hook | Description |
|---|---|
| useFileUpload | File uploads with drag-and-drop, validation & previews |
Speech
Hooks for speech recognition and synthesis using the Web Speech API.
| Hook | Description |
|---|---|
| useSpeechRecognition | Convert speech to text in real-time |
| useSpeechSynthesis | Read text aloud with voice controls |
WebRTC
Hooks for building real-time communication applications.
| Hook | Description |
|---|---|
| useUserMedia | Access camera and microphone |
| usePeerConnection | Manage WebRTC peer connections |
| useTrackToggle | Mute/unmute audio and video tracks |
| useScreenShare | Share screen, window, or browser tab |
| useAudioLevel | Detect audio levels for speaking indicators |
| useDataChannel | Send/receive data over peer connections |
DOM
Hooks for interacting with the DOM (Document Object Model).
| Hook | Description |
|---|---|
| useEventListener | Attach event listeners to window, document, or elements |
| useClickOutside | Detect clicks outside a specific element |
| usePortal | Render content into a portal (e.g., for modals) |
| useHover | Detect hover state of an element |
| useFocus | Detect focus state of an element |
| useKeyPress | Detect when a specific key is pressed |
| useComboKeyPress | Detect complex key combinations |
| useWindowScroll | Track window scroll position |
| useWindowSize | Track window dimensions |
| useOnline | Monitor online/offline status |
Utilities
General-purpose utility hooks for common patterns.
| Hook | Description |
|---|---|
| useIsMounted | Detect if component is mounted (SSR safe) |
| useClipboard | Copy and read text from the clipboard |
| useDebouncedState | Debounce state updates |
| useDebouncedCallback | Debounce callback functions |
| useThrottledState | Throttle state updates |
| useThrottledCallback | Throttle callback functions |
| useCounter | Increment/decrement with bounds |
| useCountdown | Countdown timer with callbacks |
| useShare | Share content via native share sheet |
| useEyeDropper | Pick colors from anywhere on screen |
| usePictureInPicture | Floating video window (PiP) |
| useTimeout | Delayed actions with reset & clear |
| useInterval | Declarative setInterval with pause support |
Device
Hooks for accessing device capabilities and hardware sensors.
| Hook | Description |
|---|---|
| useBattery | Access real-time battery information |
| useMediaDevices | List cameras, microphones, and speakers |
| useGeolocation | Get device location using GPS or Wi-Fi |
| useNetwork | Monitor network connection status |
| useDeviceOrientation | Access device tilt and rotation sensors |
| useWakeLock | Prevent screen from dimming/sleeping |
| useVibration | Trigger device vibration |
Performance
Hooks for optimizing application performance and resource usage.
| Hook | Description |
|---|---|
| useWasm | Load and instantiate WebAssembly modules easily. |
| useWorker | Run heavy JavaScript functions in a background Web Worker to prevent UI freezing. The perfect companion to useWasm. |
| useHardwareConcurrency | Get the number of logical CPU cores to auto-scale thread pools or lower graphics settings for low-end devices. |
| useIdle | Detect when the user's system is completely idle (away from keyboard) using the IdleDetector API. Great for auto-lock/logout features. |