Command
v1.0.21Updated 20 Oct 2026Command palette / fuzzy-search menu (cmdk). Drives ⌘K palettes, autocompletes, and command lists.
Preview
Live · 9 stories▸Why this is recommendedpalettecmdksearchautocomplete+2
The default, out-of-the-box Command.
- ✓⌘K command palette
- ✓Autocomplete inputs
- ✓Searchable selects
- Built-in fuzzy filter
- Grouped items
- Empty state
- Keyboard navigation
- CommandDialog supplies the cmdk root itself, so CommandInput / CommandList / CommandItem work as direct children
- commandProps forwards shouldFilter / filter / value to that root for server-filtered palettes
- i18n: labels prop overrides the sr-only palette title and description and the loading label (DEFAULT_COMMAND_LABELS)
- CommandList draws a visible thin themed scrollbar by default, and takes a caller-settable maxHeight — a long palette reads as scrollable, not truncated
- ✕Static menus (use DropdownMenu)
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
shouldFilterCommand: filter items as the query changes (default true). Set false when the server filters
—openCommandDialog: controlled open state
—onOpenChangeCommandDialog: open state callback
—titleCommandDialog: sr-only dialog title (defaults to the labels value)
—descriptionCommandDialog: sr-only dialog description (defaults to the labels value)
—commandPropsCommandDialog: props for the Command root it wraps the children in, e.g. { shouldFilter: false }. Ignored when the children bring their own Command
—showCloseButtonCommandDialog: show the dialog close button (default false)
—labelsOverride the built-in sr-only title / description and the loading label for i18n; English defaults exported as DEFAULT_COMMAND_LABELS
—scrollbarCommandList: how the scrollbar is drawn once the list overflows. Default 'thin' — a visible themed bar; 'hidden' restores the pre-1.0.9 no-scrollbar behaviour; 'auto' leaves the platform bar alone
—maxHeightCommandList: cap the list's height (number = px, string = any CSS length such as '50vh'). Omitted, the list keeps its 18rem (max-h-72) default
—