Command
A search line and a list that narrows as you type. Groups, shortcuts, and a dialog wrapper.
wire it to⌘K
Command palette
Search for a command to run.
Installation
npx shadcn@latest add @afterglow/commandComposition
Component structure.
Command
├── CommandInput
└── CommandList
├── CommandEmpty
├── CommandGroup
│ └── CommandItem
│ └── CommandShortcut
└── CommandSeparator
CommandDialogAPI Reference
Command
The palette itself, laid into a page.
CommandDialog
The same palette in a dialog. title and description are its accessible name, read out rather than drawn, so they are worth setting to what the palette actually searches.
| Prop | Type | Default |
|---|---|---|
| title | string | "Command palette" |
| description | string | "Search for a command to run." |
| showCloseButton | boolean | false |
Everything else is cmdk's API, documented there.