Behavior, one hook at a time.
Choose the behavior you need. Each hook opens a focused guide with its own example, options, return values, and component preview.
- Hooks
- 19
- Groups
- 5
- Runtime
- React
Start with React installation and setup. In an application with React Server Components, call these hooks from a client component. React Native has its own native controllers.
Overlays and menus
Open a surface, manage focus, and return safely to the trigger.
useDialog
Manages modal and alert dialog lifecycle — open, close, focus trapping, backdrop click dismiss, and Escape key handling. Spreads props onto a <dialog> element.
Dialog · Options, controller, and exampleusePopover
Manages popover disclosure — toggle, outside click close, Escape key dismiss, and arrow key navigation through focusable panel items.
Popover · Options, controller, and exampleuseDropdownMenu
Manages dropdown menu disclosure — identical API to usePopover but sets aria-haspopup to "menu" for correct ARIA semantics on menu triggers.
DropdownMenu · Options, controller, and exampleuseContextMenu
Binds a trigger to a context menu that opens on right-click or Shift+F10 and supports Escape and roving item focus.
ContextMenu · Options, controller, and exampleuseTooltip
Manages tooltip show/hide with configurable delay, hover and focus triggers, and Escape key dismissal.
Tooltip · Options, controller, and exampleSelection and preferences
Connect selected values, language, and appearance to your application.
useLanguageToggle
Coordinates controlled or uncontrolled locale cycling, persistence, and document language synchronization for React applications.
LanguageToggle · Options, controller, and exampleuseTabs
Manages a tabbed interface with controlled/uncontrolled value, arrow key navigation, roving tabindex, and automatic ARIA attributes for tab triggers and panels.
Tabs · Options, controller, and exampleuseSelect
Manages a fully custom select with native <select> fallback, ARIA listbox, typeahead character search, keyboard navigation, and external form integration.
Select · Options, controller, and exampleuseThemeToggle
Synchronizes a light or dark theme with the document, local storage, and the shared theme-change event, with an optional pointer-origin transition that respects reduced motion.
ThemeToggle · Options, controller, and exampleForms and dates
Handle validation, calendar selection, date ranges, and one-time codes.
useFormValidation
Enhances native HTML form validation with custom error messages via data-error-* attributes, live field description syncing, and programmatic validity control.
Form · Options, controller, and exampleuseCalendar
Builds an Astro-compatible calendar grid with hidden input value, min/max clamping, month navigation, selection, and roving keyboard focus.
Calendar · Options, controller, and exampleuseDateRangePicker
Keeps paired native date inputs constrained so the end date cannot be before the start date.
DateRangePicker · Options, controller, and exampleuseInputOTP
Builds an Astro-compatible OTP field with a native input, visual segments, sanitized values, and caret navigation.
InputOTP · Options, controller, and exampleEditors and workspaces
Compose editable content, schedules, boards, panes, and themes.
useRichTextEditor
Provides rich text editing commands, values, shortcuts, active toolbar state, and HTML/text change details.
RichTextEditor · Options, controller, and exampleuseSchedule
Provides props for schedule/agenda slot and event elements, and emits change details when a slot or event is interacted with.
Schedule · Options, controller, and exampleuseKanban
Provides controlled Kanban move requests and accessible props for boards, columns, items, and dedicated drag handles across keyboard, mouse, and touch input.
KanbanBoard · Options, controller, and exampleuseResizable
Provides pane sizing props and separator handle props for horizontal or vertical resizable groups.
Resizable · Options, controller, and exampleuseThemeBuilder
Interactive theme builder with controllable hue, accent, mode (generated/manual), scheme (light/dark), color pickers, and export in CSS, Figma variables, or design token formats.
ThemeBuilder · Options, controller, and exampleFeedback
Create, update, and dismiss notifications from React state.