Skip to main content
  1. Docs
  2. Components
  3. Actions

Command palette

Search or jump to: anything in the console, by name, from the top bar or ⌘K.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.6
Renders
<div role="dialog">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Finding any record, page, setting or action by its name, from anywhere.
  • A console's search: the top bar's search and ⌘K open the same palette.
  • Reaching a setting by what people call it: "MFA" finds Two-step sign-in.
Not for
  • Choosing a value in a formCombobox
  • A few actions from a buttonMenu
  • Moving between a few viewsTabs

02

Anatomy

  1. 1command-palette<div role="dialog">The root: a modal dialog over the page, its search box first.
  2. 2command-item<div role="option">A result: its icon or avatar, its label, its description.
  3. 3command-item-meta<span>At its end: where it lives, or what kind it is.

03

Do and don't

Say where it lives
Dometa says where each setting is.
Don'tBare labels: which Policies?
Grouped by kind
DoPeople, apps and settings, each under its label.
Don'tOne list: a person beside an app beside a setting.

04

Content

  • Results are named as the console names them: "Two-step sign-in".
  • keywords hold what people type instead: "MFA", "2FA".
  • meta says where it lives, "Security › Policies", or its kind, "OIDC".
Next — Command paletteAPI