Components
CommandPalette
Modal ⌘K command finder with grouped actions, shortcuts, and async loading.
Install
@hewnui/ui · @hewnui/themes · hewnui
First install? Follow Getting started for peers, CSS and providers.
CommandPalette pairs a dialog trigger with React Aria Autocomplete and Menu. Filter grouped commands, show shortcut hints, and wire an optional global hotkey.
Press Ctrl+J on this page. Ctrl/⌘K is taken by docs search here; in your app the hook defaults to ⌘K / Ctrl+K.
Usage
States
- Loading —
CommandPaletteList isLoadingshows a polite status with spinner - Empty — filtered Menu
renderEmptyStateviaemptyLabel - Disabled —
CommandPaletteItem isDisabled
Accessibility
- Dialog role with an accessible name; focus moves into the search field on open
- Escape and outside click dismiss; focus returns to the trigger
- Arrow keys move between commands; Enter activates; typeahead filtering via Autocomplete
- Shortcut hints use the
Keyboardelement; icons are presentational - Reduced motion: enter/exit transitions fall back with
motion-reduce
Hotkey on this page
Press Ctrl+J (⌘J on Mac) on this page. Ctrl/⌘K is taken by docs search here; in your app the hook defaults to ⌘K / Ctrl+K.
API reference
Props for CommandPalette from @hewnui/ui/command-palette. Generated from component types — not hand-written.
Prop
Type
CommandPaletteTrigger
Props for CommandPaletteTrigger.
Prop
Type
CommandPaletteInput
Props for CommandPaletteInput.
Prop
Type
CommandPaletteList
Props for CommandPaletteList.
Prop
Type
CommandPaletteGroup
Props for CommandPaletteGroup.
Prop
Type
CommandPaletteItem
Props for CommandPaletteItem.
Prop
Type
CommandPaletteRecent
Props for CommandPaletteRecent.
Prop
Type