Fiber UI LogoFiberUI

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.

HookDescription
useLocalStorageStateSync state with localStorage (persistent)
useSessionStorageStateSync state with sessionStorage (per-tab)
useIndexedDBStore large data in IndexedDB
useFileSystemRead/write files to local disk


Form

Hooks for building forms and handling user input.

HookDescription
useFileUploadFile uploads with drag-and-drop, validation & previews

Speech

Hooks for speech recognition and synthesis using the Web Speech API.

HookDescription
useSpeechRecognitionConvert speech to text in real-time
useSpeechSynthesisRead text aloud with voice controls

WebRTC

Hooks for building real-time communication applications.

HookDescription
useUserMediaAccess camera and microphone
usePeerConnectionManage WebRTC peer connections
useTrackToggleMute/unmute audio and video tracks
useScreenShareShare screen, window, or browser tab
useAudioLevelDetect audio levels for speaking indicators
useDataChannelSend/receive data over peer connections


DOM

Hooks for interacting with the DOM (Document Object Model).

HookDescription
useEventListenerAttach event listeners to window, document, or elements
useClickOutsideDetect clicks outside a specific element
usePortalRender content into a portal (e.g., for modals)
useHoverDetect hover state of an element
useFocusDetect focus state of an element
useKeyPressDetect when a specific key is pressed
useComboKeyPressDetect complex key combinations
useWindowScrollTrack window scroll position
useWindowSizeTrack window dimensions
useOnlineMonitor online/offline status

Utilities

General-purpose utility hooks for common patterns.

HookDescription
useIsMountedDetect if component is mounted (SSR safe)
useClipboardCopy and read text from the clipboard
useDebouncedStateDebounce state updates
useDebouncedCallbackDebounce callback functions
useThrottledStateThrottle state updates
useThrottledCallbackThrottle callback functions
useCounterIncrement/decrement with bounds
useCountdownCountdown timer with callbacks
useShareShare content via native share sheet
useEyeDropperPick colors from anywhere on screen
usePictureInPictureFloating video window (PiP)
useTimeoutDelayed actions with reset & clear
useIntervalDeclarative setInterval with pause support

Device

Hooks for accessing device capabilities and hardware sensors.

HookDescription
useBatteryAccess real-time battery information
useMediaDevicesList cameras, microphones, and speakers
useGeolocationGet device location using GPS or Wi-Fi
useNetworkMonitor network connection status
useDeviceOrientationAccess device tilt and rotation sensors
useWakeLockPrevent screen from dimming/sleeping
useVibrationTrigger device vibration

Performance

Hooks for optimizing application performance and resource usage.

HookDescription
useWasmLoad and instantiate WebAssembly modules easily.
useWorkerRun heavy JavaScript functions in a background Web Worker to prevent UI freezing. The perfect companion to useWasm.
useHardwareConcurrencyGet the number of logical CPU cores to auto-scale thread pools or lower graphics settings for low-end devices.
useIdleDetect when the user's system is completely idle (away from keyboard) using the IdleDetector API. Great for auto-lock/logout features.