Composed
Command palette
Grouped, keyboard-first search over everything a person can do.
esc
Actions
Go to
Recent
↑↓navigate↵open4 results
Installation
npx shadcn@latest add https://ui.whoisroktim.lol/r/command.jsonGroups are derived
A group header only exists if something in it matched, so an empty section never appears. The highlight is clamped during render rather than corrected in an effect — there is no pass where it points past the end of a shrinking list.
Keywords that are not on the row
keywords lets an item be findable by something it does not display. A vendor in
the middle of a renewal should turn up under "renewal" even though its row shows
a notice date.
Escape clears, then closes
The same rule the dropdowns follow. A mistyped query costs one keystroke, not the
whole interaction. CommandK mounts this as a global overlay bound to ⌘K.
| Prop | Type | Default | Description |
|---|---|---|---|
| commands | Command[] | — | id, group, label, icon, optional meta, shortcut and keywords. |
| initialQuery | string | "" | Opens pre-filtered. |
| onPick | (c: Command) => void | — | Fires on Enter or click. |
| onClose | () => void | — | Supply when it is an overlay — otherwise the esc hint promises nothing. |