⌘K search and quick actions from any page, with filter chips, history and counted results.
organismOverlays
Default
A button opens the menu; type to search, arrow keys to move, Enter to run.
Last action: Nothing yet
Installation
Import
Lives in src/design-system/components/command-menu.tsx.
import { Kbd, CommandMenu, useCommandMenuShortcut } from "@/design-system/components/command-menu";Usage
useCommandMenuShortcut(() => setOpen(true));
<CommandMenu open={open} onOpenChange={setOpen} groups={groups} filters={filters} />Examples
Filter chips
Chips under the search box narrow results to projects, clients or people.
Keyboard shortcut
Open the menu from anywhere on the page with ⌘K or Ctrl+K.
or press ⌘ K
When to use
Use it when
- Global search across people, files and actions
Don’t use it when
- Filtering the list on the current page → Field and inputs (Input type=search) or Filter pills
Rules
- Bind it once with useCommandMenuShortcut()
- Give items a category so the filter chips work
- Opens and closes like Dialog (DIALOG_MOTION, 280ms ease-smooth)
Properties
CommandMenu
| Prop | Type | Default |
|---|---|---|
open * | boolean | – |
onOpenChange * | (open: boolean) => void | – |
groups * | CommandGroup[] | – |
placeholder | string | "Search" |
filters | CommandFilter[] | – |
footer | ReactNode | – |
label | string | "Command menu" |
className | string | – |
* required
Accessibility
- Combobox with a listbox; arrows move, Enter runs, Escape closes