Command
stableA command palette with fuzzy search, cmdk-style.
Basic usage
Suggestions
Search
Settings
Examples
With shortcuts and groups
A command palette with keyboard shortcuts, icons, and multiple sections.
Suggestions
SearchCtrl K
Favorites
Inbox
Settings
PreferencesCtrl ,
Command palette with groups
Command combines search input, grouped actions, shortcuts and empty states.
Navigation
Dashboard G D
Members G M
Actions
Create project
Open settings
Features
- Fuzzy filtering.
- Groups, items, shortcuts.
Installation
bash
pnpm dlx structyl add commandAPI Reference
Command.Root
A command palette with fuzzy search.
| Prop | Type | Default |
|---|---|---|
| value | stringControlled highlighted value. | — |
| onValueChange | (value: string) => voidCalled when the highlighted item changes. | — |
| filter | (value, search, keywords?) => numberCustom scoring function. | — |
| shouldFilter | booleanWhether to filter items internally. | true |
| loop | booleanWhether arrow navigation wraps. | false |
Command.Input
The search field.
| Prop | Type | Default |
|---|
Command.List
The scrollable result list.
| Prop | Type | Default |
|---|
Command.Item
A command entry.
| Prop | Type | Default |
|---|---|---|
| value | stringMatch value. | — |
| keywords | string[]Extra search terms. | — |
| onSelect | (value: string) => voidCalled on selection. | — |
| disabled | booleanDisable the item. | — |
Command.Group
A labelled group of items.
| Prop | Type | Default |
|---|---|---|
| heading | ReactNodeGroup heading. | — |
Command.Empty
Shown when nothing matches.
| Prop | Type | Default |
|---|
Command.Separator
A visual divider.
| Prop | Type | Default |
|---|