Command Palette
also known as⌘K menu · cmd-k · spotlight · quick switcher · action menu
A keyboard-first search overlay (usually triggered with ⌘K) that exposes navigation, actions, and search in a single dialog.
A command palette is a centered overlay dialog activated by a global keyboard shortcut — almost always `⌘K` on macOS, `Ctrl+K` on Windows. It exposes an input field with fuzzy search across pages, settings, recent items, and contextual actions. Each result has a label, an optional icon, and often a keyboard shortcut on the right.
The pattern originated in code editors (Sublime Text, VS Code) and migrated to power-user productivity tools, then to mainstream products as users became fluent with `⌘K`. It's now the dominant power-user navigation pattern for any app with more than ~30 actions.
Key craft details: the dialog uses a heavy backdrop blur, is centered on the viewport (not modal-stuck-to-top), supports arrow-key navigation and `Enter` to invoke, and shows the active row with a subtle highlight tint, not a full background.
- Power-user products (developer tools, design tools, CMS, dashboards)
- Any app with 30+ distinct navigation destinations or actions
- Apps where users repeat the same flow many times per day
- Consumer apps where users won't discover the shortcut
- Mobile-first products (no global keyboard)
- Simple marketing sites with 5–7 pages
- +Bind to `⌘K` (Mac) and `Ctrl+K` (Win/Linux) — don't invent a new shortcut
- +Show the shortcut hint (`⌘K`) in a visible spot in the UI
- +Group results: Pages, Actions, Recent, Help
- +Make the input autofocus on open and `Esc` close
- −Don't make the palette the only way to access important features
- −Don't put it modal at the top of the screen — center it
- −Don't load all actions synchronously — fuzzy-search a static index
People also ask
What library should I use to build a command palette?
`cmdk` (by pacocoursey) is the de-facto React primitive — unstyled, accessible, with built-in fuzzy search. Combine it with your design system for the visual layer.
Should command palette replace the main navigation?
No. It augments navigation for power users but should never be the only way to reach a destination. Always keep a visible nav for first-time users.