Skip to content
The Product Guys
All patterns
Navigation5 min read

The Command Palette

One keyboard shortcut that opens a searchable index of everything the product can do.

The problem it solves

A product with hundreds of commands cannot fit them in menus without burying most of them. Frequent users pay that cost on every action.


A palette collapses the menu tree into a single text input. The user types a fragment of intent and gets matching commands, documents, and settings in one ranked list. It is the fastest navigation pattern available for an expert, and it is invisible to everyone else, which is both its strength and its trap.

  1. 1Bind it to the platform convention: Command K on macOS, Control K elsewhere. Do not invent a shortcut.
  2. 2Index commands, objects, and settings in the same list, because users do not separate go there from do that in their heads.
  3. 3Match on fuzzy substrings and on synonyms, so dark finds Toggle dark mode and rm finds Delete.
  4. 4Rank by recency and frequency per user, so the palette adapts to what each person actually does.
  5. 5Show the keyboard shortcut next to any command that has one. The palette then teaches its own replacements.
  6. 6Give every command a visible entry point elsewhere in the interface too, so the palette stays an accelerator rather than the only door.

The last rule is the one teams break. Once a palette exists it becomes tempting to ship new features into it alone, since it costs no layout. The result is a product where the important capabilities are undiscoverable unless someone already knows to look for them.

Palette that only serves insiders

  • Commands named after internal concepts, like Reconcile entity
  • Exact-prefix matching only
  • No hint anywhere in the interface that it exists

Palette that teaches itself

  • Commands named after user intent, like Merge duplicate contacts
  • Fuzzy matching with synonyms, so merge dupes finds it
  • A visible search field in the header showing the Command K hint

Discovery is the whole design problem. A small persistent affordance: A visual cue that tells you what an element will do if you act on it., a bar in the header or a hint in the empty state: What a screen shows before there is any content in it., converts the palette from folklore into a feature. Products that add the hint find that the palette gets used by people who never read a shortcut list.

Worked example

A hypothetical ranking change

A team ranks palette results alphabetically at first, then switches to ranking by the user's own last twenty actions. For a person who archives items all day, Archive moves to the top of an empty palette. The change is small and it converts the palette from a lookup tool into a repeat tool, which is where most of its value sits.

When it fits

  • The product has more commands than a menu bar can hold without three levels of nesting.
  • A meaningful share of users work in it daily and will build muscle memory.
  • Commands and objects can share an index, so one query can return both.
  • The product runs somewhere a keyboard is present and central to the work.

When it backfires

  • It becomes the only path to a feature, which makes that feature invisible to everyone who does not already know it exists.
  • The shortcut collides with a browser or OS binding, so it fails unpredictably depending on focus.
  • Command names use internal vocabulary, so no plausible query finds them.
  • The user base is occasional rather than daily, in which case the effort belongs in clearer menus.

Products using it

  • Linear

    Puts nearly every action behind Command K and shows the matching keyboard shortcut beside each result.

  • VS Code

    Popularised the pattern in general-purpose software, indexing commands, files, and settings through one input.

  • Slack

    Merges navigation and commands into a single top-bar search, which doubles as the discoverable entry point.

The psychology under it

The takeaway

A palette is an accelerator, so index by intent, rank by the user's own history, and never let it be the only route.

Finished the teardown? Bank it and the day counts toward your run.