Command
Command palette for quick actions
Searchable command palette with keyboard navigation.
Usage
With icons
Keyboard shortcuts
- Arrow up/down - Navigate items
- Enter - Select highlighted item
- Type - Filter items
Custom placeholder
Item callbacks
Each item can have its own onSelect:
Props
Command
| prop | type | default | description |
|---|---|---|---|
| items | CommandItem[] | required | List of command items |
| placeholder | string | "search..." | Input placeholder |
| onSelect | (item) => void | - | Callback when item selected |
CommandItem
| prop | type | description |
|---|---|---|
| id | string | Unique identifier |
| label | string | Display text |
| icon | ReactNode | Optional icon |
| onSelect | () => void | Optional item callback |