Command Menu

The keyboard-first jump-anywhere palette.

v1.0.0·Updated Jul 8, 2026 · 10:45
Live Demo — Fully Interactive
The ⌘K palette — search, arrow keys, groups
ESC
Navigation
Actions
Help
↑↓ to navigate↵ to selectesc to close
Configuration
State
Groups
Shortcuts
Search…ESC
Navigation
Go to OverviewG O
Actions
New projectN
<CommandMenu grouped shortcuts placeholder="Search…" />
Behavior — The Engineering Contract
Prop / eventTypeNotes
open / onOpenChangebooleanControlled; toggled by ⌘K
Item.onSelect() => voidRuns the command and closes
icon / shortcutReactNode / stringLeading glyph, trailing key hint
Group.labelstringMono section heading
⌘K · ↑↓ · ↵ · escOpen, move, run, close; typing filters

The palette jumps anywhere and runs any command from the keyboard. For choosing one value use a Combobox; for a per-object action list use a Menu.

Anatomy
Type a command…ESC
Actions
New projectN
1SearchFilters commands as you type.
2Active rowKeyboard cursor; Enter runs it.
3ShortcutThe direct key for the command.
Do's and Don'ts
✓ Do
Navigation
Go to ProjectsG P

Group commands and show their shortcuts so people learn them.

✕ Don't
Command aCommand bCommand cCommand dCommand e

Don't dump one flat, unranked list. Group and fuzzy-rank.

✓ Do
No commands match “xyz”.

Give the no-match case a calm, specific message.

✕ Don't
Search

Don't hide it behind a click only. Bind it to ⌘K everywhere.

In context: Examples
A · Jump to
Go to OverviewG O

Navigate anywhere without touching the mouse.

B · Run action
New projectN

Trigger any registered command by name.

C · Search
invoice

Blend commands with live search results.

Measurements & Tokens
TokenValueRole
--cmd-w440pxPalette width
--cmd-bg#141519Panel surface
--cmd-active#1E1F25Keyboard-active row
--cmd-list-h244pxScroll cap on the list
--cmd-groupmono · #565A62Group heading
--cmd-trigger⌘K / Ctrl-KGlobal open shortcut
Code
<div class="o-cmd" role="dialog" aria-label="Command menu">
  <div class="o-cmd__search"><SearchIcon />
    <input class="o-cmd__input" placeholder="Type a command or search…" /><kbd>ESC</kbd>
  </div>
  <div class="o-cmd__list" role="listbox">
    <div class="o-cmd__group">Navigation</div>
    <button role="option" class="o-cmd__item is-active"><HomeIcon /> Go to Overview <kbd>G O</kbd></button>
  </div>
  <div class="o-cmd__foot">↑↓ navigate · ↵ select · esc close</div>
</div>