# Command Palette

A command palette is an on-demand searchable interface for finding and running commands or navigating to destinations, usually optimized for keyboard use.

- Type: artifact
- Domain: Experience & interface
- Level: Intermediate
- Last reviewed: 2026-10-06
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/command-palette/>)

## What it means

A command palette combines a text input with a filtered list of available commands, resources, or destinations. It opens from a visible control or keyboard shortcut, ranks results from typed queries and context, and executes the selected item. It supplements rather than replaces a product’s understandable navigation and command structure.

## Why it matters

For products with many commands, a palette gives experienced users a fast path without requiring memorized shortcuts or deep menu traversal. Its query logs can also reveal vocabulary mismatches, provided teams handle those logs with suitable privacy controls.

## When to use it

Use a command palette in command-rich products where users repeat tasks across many views and can benefit from keyboard efficiency. Avoid it as the only route to core functions, in simple products with few commands, or when search results cannot clearly distinguish actions from destinations.

## How it works

1. Inventory eligible commands and destinations with stable names, synonyms, scope, and availability rules.
2. Provide a discoverable opener and a documented shortcut that avoids platform conflicts.
3. Filter and rank results as users type while showing command type, context, and shortcut where useful.
4. Support predictable list navigation, execution, dismissal, empty results, and focus return.
5. Measure successful execution and failed queries, then improve labels and ranking without hiding core navigation.

## A practical example

An analytics workspace opens a palette with Command-K. Typing “export” lists Export current chart and Export dashboard with scope labels; choosing the chart command opens its format dialog, and Escape returns focus to the chart without changing the current page.

## Where it breaks

The pattern favors users who know roughly what to type, ranking errors can bury commands, and a large command registry requires governance. Global shortcuts may conflict with browsers, operating systems, assistive technology, or user customizations.

## Common mistakes

- Using the palette to compensate for incoherent navigation or labels.
- Showing actions and destinations with identical presentation and ambiguous outcomes.
- Providing no visible opener or shortcut documentation.
- Collecting query text without considering sensitive information and retention.

## Sources

1. [User interface](<https://code.visualstudio.com/docs/editing/getting-started/userinterface>) — Visual Studio Code · Official documentation
2. [GitHub Command Palette](<https://docs.github.com/en/get-started/accessibility/github-command-palette>) — GitHub Docs · Official documentation

## Related topics

- [Search Design](<https://wiki.soroush.uk/topic/search-design/>)
- [Menu and Menu Button](<https://wiki.soroush.uk/topic/menu-and-menu-button/>)
- [Keyboard Accessibility](<https://wiki.soroush.uk/topic/keyboard-accessibility/>)
