CommandPalette
Modal Cmd-K palette with grouped commands, fuzzy filter, and full keyboard navigation (arrows, Enter, Escape).
Preview
Usage
import { CommandPalette } from '@ramtt/ui'
<CommandPalette
open={open}
onOpenChange={setOpen}
groups={[{ label: 'Actions', items: [{ id: 'new', label: 'New project' }] }]}
onSelect={(item) => run(item)}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| open* | boolean | — | Controls visibility |
| onOpenChange* | (open: boolean) => void | — | Open-state setter |
| groups* | CommandGroup[] | — | Grouped command items |
| onSelect* | (item: CommandItem) => void | — | Called when a command is chosen |
| placeholder | string | 'Search...' | Input placeholder |
| className | string | — | Additional Tailwind classes on the dialog |