… in learning and structuring the space, the artifact has accumulated more operations and destinations than persistent toolbars and menus can carry, and is being made addressable in words — or, at the caret, shaped as a block-based editor. This pattern specialises searching over the artifact's commands and destinations rather than its content. Where the actor has already selected a target on screen and only needs a routine operation on it, contextual actions already serve that moment.
Problem
When an interface exposes every capability in persistent toolbars and nested menus, the surface crowds and actors spend their attention hunting through someone else’s hierarchy; when it hides capabilities behind keyboard shortcuts, only actors who have memorised the bindings can reach them. Invoking commands by name cuts through the hierarchy, but shifts the work from recognition to recall: actors often do not know what the system calls the action they want, and an unprompted text box hides what the surface can do.
Most actors remain perpetual intermediates (mastery): they use a tool daily and know what they want to do, yet never memorise a full set of keyboard shortcuts (Cockburn et al., 2014). A command menu sits between visual menu scanning and memorised key bindings. The actor only has to recall a fragment of a name—a verb, an object, or a few initials—and incremental filtering turns the rest of the act back into recognition over a short ranked list. Because each entry displays its keyboard shortcut beside the label, every lookup also rehearses the faster path at the moment of intent (Malacria et al., 2013).
Two failure modes limit the pattern. First, naming requires a shared vocabulary: two people naming the same operation spontaneously choose the same word less than 20% of the time (Furnas et al., 1987), and actors often query by the effect they want rather than the feature’s name (Fourney et al., 2011). A menu that matches only exact labels is fast for actors who already speak the tool’s language and no help to actors who came looking for it. Second, because the menu shows only what applies in the current context, inapplicable commands are absent rather than visibly out of reach—which clears away irrelevant clutter, but turns a command the actor expected to find into a mystery unless unavailable actions are accounted for.
Across tools, the pattern appears at two scales:
- Global command palette: summoned from anywhere by a shortcut (such as
⌘Kor⌘⇧P) or a header trigger as a transient overlay over the workspace. It spans application-wide actions, navigation jumps across sections, settings, and recent items. - Local inline menu: summoned where a capability has a command space of its own, such as inside a text field, composer, or block-based editor, by typing a trigger character (usually a slash). It opens at the caret, the actor names the action first, and what the action applies to follows from where the caret is. Nothing has to be selected beforehand, which is the difference from contextual actions.
What holds constant across both scales is that a transient text input filters a ranked list of executable commands in place, matches fragments and aliases rather than exact prefixes alone, shows the shortcut or trigger beside each entry, and closes cleanly to return focus to the work as soon as the command runs or the actor cancels.
Solution
Give the actor a keyboard-summoned input—opened globally from anywhere in the workspace or locally by a trigger character at the caret—that filters the available actions and destinations as they type and executes the chosen entry on commit. Before a query is typed, open with recent and bookmarked items; as the actor types, match across command names, synonyms, and initials, rank context-relevant and recently used commands first, and show each command’s keyboard shortcut or trigger beside its label.
Do not use a command menu to justify stripping everyday actions from the visible surface: actors who do not yet know what the tool can do cannot guess its names, so the main workflow must stay operable without opening the menu. In an inline slash menu, treat the trigger character as ordinary text whenever the actor keeps typing past the last match or presses Escape, so writing a literal slash in prose never traps the cursor.
Continuation
Before the actor types a character, open the command menu onto recents and saved bookmarks so returning to a recent action or a pinned destination takes no typing at all. As the actor types, pair the input with autocomplete that matches fragments, initials, and synonyms across command names and parameters, since naming only helps when the actor does not need the exact label up front. Show keyboard shortcuts beside each entry so every lookup rehearses the direct key bindings that carry the actor toward mastery. Inside a text field or editor, let a trigger character such as a slash open the command menu at the caret to apply prestructured formatting without leaving the line. Filter the list to actions that apply in the current state, and handle unavailable actions that the actor still expects to find by keeping them searchable with the reason they cannot run here rather than letting them vanish without trace. Where the actor describes an outcome in their own words and no command matches, offer an agent fallback, which takes what they typed and returns the matching command with its arguments filled in. When the request combines several operations or asks for new content that no single command in the vocabulary covers, hand the input off to a prompt…
All connections
- Precedes
- Unavailable actions — Filter the list to actions that apply in the current state, and handle unavailable actions that the actor still expects to find by keeping them searchable with the reason they cannot run here rather than letting them vanish without trace.
- Enables
- Addressable in words, block-based editor — In learning and structuring the space, the artifact has accumulated more operations and destinations than persistent toolbars and menus can carry, and is being made addressable in words — or, at the caret, shaped as a block-based editor.
- Instantiates
- Searching — This pattern specialises searching over the artifact's commands and destinations rather than its content.
- Hosts
- Bookmarking, recents — Before the actor types a character, open the command menu onto recents and saved bookmarks so returning to a recent action or a pinned destination takes no typing at all.
- Complements
- Autocomplete — As the actor types, pair the input with autocomplete that matches fragments, initials, and synonyms across command names and parameters, since naming only helps when the actor does not need the exact label up front.
- Collaboration — keeps collaboration commands accessible without crowding the surface
- Keyboard shortcuts, mastery — Show keyboard shortcuts beside each entry so every lookup rehearses the direct key bindings that carry the actor toward mastery.
- Fully connected — keyboard-driven alternative for power users
- Help — “Index help pages for searching and the command menu under the words actors use as well as the artifact's own labels, and keep external documentation aligned with the interface through cross-channel continuity so each links to the other under the same names.”
- Hub and spoke — “Give actors who know their destination a command menu and searching to reach a spoke without the hub, and use deep linking so spokes can be reached from outside the structure altogether.”
- Multilevel tree — quick access bypassing hierarchy
- Prestructured formatting — Inside a text field or editor, let a trigger character such as a slash open the command menu at the caret to apply prestructured formatting without leaving the line.
- Workspace — “Give the set of workspaces a switcher: a list of workspaces works as a hub, and a command menu lets an actor who knows the name go straight to one.”
- Tangential to
- Modality — overlay invocation that intersects modality without being defined by it
- Alternatives
- Contextual actions — Where the actor has already selected a target on screen and only needs a routine operation on it, contextual actions already serve that moment.
- Prompt — When the request combines several operations or asks for new content that no single command in the vocabulary covers, hand the input off to a prompt
- Related to
- Flat navigation — efficient tool access
- Undo — can be used to access undo options
- Enabled by
- Agent fallback — Where the actor describes an outcome in their own words and no command matches, offer an agent fallback, which takes what they typed and returns the matching command with its arguments filled in.
- Appears in
- Structuring the space: Growing past the model, step 1
- Learning: Opening routes past the interface, step 2
- Related components
- Command menu — the mechanism: the combobox composition with hierarchical drill-in and AI fallback
- Combobox — the mechanism this pattern builds on;
src/components/combobox/drives the text input, filtered list, and keyboard model - Keyboard key — renders the shortcut hints alongside each command
- Context menu — pointer-driven and target-aware; command menu is keyboard-driven and name-based
- Toolbar — exposes a persistent subset of commands; the command menu offers the full set on demand
In practice
Parameter drill-in and action–object order
Many commands need both an operation and a target (Move issue to… → Backlog, Change status… → In progress, Insert block → Heading 2). A command menu handles multi-part commands by drilling into a secondary list inside the same input: choosing the parent command pins it as a scope token in the input and swaps the list to its valid arguments, with Backspace or Escape stepping back one level. Supporting both orders—picking the action first (Assign to… → Alice) and picking the object first (Alice → Assign)—lets the actor start with whichever part is top of mind.
Prefix modes in unified launchers
When one input combines command execution with content searching, workspace switching, or prompting, lightweight mode prefixes keep the lists from colliding: typing > scopes the bar to commands, @ to people or references, # to tags or issues, and / inside a composer to inline commands. Render the active scope as a removable chip in the input so the mode stays visible and escapable (modality).
Vocabulary aliases and fallback
Because actors type the words they know rather than the label in the menu, index each command with common synonyms, task verbs, and category names alongside its display title, and support subsequence or initial matching (gi for Go to inbox). When a query returns no lexical match, offer a way on rather than stranding the actor on an empty list: an agent fallback that finds the command by meaning, or handing the query to search or a prompt.
Research on this pattern
- Vocabulary mismatch in command naming: Furnas, Landauer, Gomez and Dumais (1987) found that two people naming the same command or object spontaneously chose the same term less than 20% of the time, and a single designer-chosen name matched an untutored actor’s first try only 7–18% of the time. Indexing multiple aliases gathered from use did far better than any single label.
- Bridging goal descriptions to feature names: Fourney, Mann and Terry (2011) (Query-Feature Graphs) and Adar, Dontcheva and Laput (2014) (CommandSpace) showed that actors often search by desired outcomes (“black and white”) rather than system command names (“desaturate”), and that mapping natural-language task phrases onto command vocabularies bridges that execution gap.
- From menu scanning to shortcut adoption: Cockburn, Gutwin, Scarr and Malacria (2014) reviewed why actors remain in visual menu navigation even when faster accelerators exist, and Malacria, Bailly, Harrison, Cockburn and Gutwin (2013) showed that exposing hotkey bindings during active command selection promotes shortcut rehearsal and adoption in the flow of work.
- Named commands beside open prompts: Lehmann and Buschek (2024) observed that repeated prompts for the same operation compress toward one- or two-word commands, with actors relying on named commands and controls for predictable, recurring operations and open prompts for novel combinations.
Resources & references
- Furnas, G. W., Landauer, T. K., Gomez, L. M., & Dumais, S. T. (1987) The vocabulary problem in human-system communication, Communications of the ACM, 30(11), 964–971
- Raskin, J. (2000) The Humane Interface, Addison-Wesley
- Fourney, A., Mann, R., & Terry, M. (2011) Query-feature graphs: bridging user vocabulary and system functionality, UIST ‘11
- Malacria, S., Bailly, G., Harrison, J., Cockburn, A., & Gutwin, C. (2013) Promoting hotkey use through rehearsal with ExposeHK, CHI ‘13
- Adar, E., Dontcheva, M., & Laput, G. (2014) CommandSpace: modeling the relationships between tasks, descriptions and features, UIST ‘14
- Cockburn, A., Gutwin, C., Scarr, J., & Malacria, S. (2014) Supporting novice to expert transitions in user interfaces, ACM Computing Surveys, 47(2)
- Bailly, G., Lecolinet, E., & Nigay, L. (2016) Visual menu techniques, ACM Computing Surveys, 49(4)
- Lehmann, F., & Buschek, D. (2024) Functional flexibility: how users combine prompts and GUI actions over time
- AI UX Playground — Slash commands