Skip to content
Storybook

Command palette

Global ⌘K launcher for navigation and actions. Results are grouped and filter as you type.

Preview

React · live from the Storybook

HTML and CSS

The same component as plain HTML with pixels-ui.css, no framework needed.

Recent
Actions
↑↓ move↵ openesc close

Installation

Included in the core files. No extra install.

HTML
<link rel="stylesheet" href="/css/pixels-tokens.css">
<link rel="stylesheet" href="/css/pixels-ui.css">
<script src="/js/pixels-ui.js" defer></script>

API reference

Class / attributeTypeDescription
dialog.px-commandclassPalette.
data-px-command-listattributeFiltering and arrow-key selection.

Figma properties

Command palette2 variants · page “Overlays”Open

Global ⌘K / Ctrl+K launcher for navigation and actions. Results are grouped (Recent, Actions) and filter as you type; arrow keys move, Enter runs, Escape closes. Uses Menu item rows.

PropertyTypeValues
DirectionVariantLTR RTL

Design tokens

Component tokens from the Figma Component collection. Override them to restyle just this component.

TokenAliasLight value
--px-menu-backgroundcolor-surface-overlay#ffffff
--px-menu-bordercolor-border-neutral-subtle#f2f4f7
--px-menu-item-background-hovercolor-background-neutral-default#f2f4f7
--px-menu-item-background-selectedcolor-background-brand-subtle#eff6ff
--px-menu-item-content-selectedcolor-content-brand-default#2563eb
--px-menu-item-content-destructivecolor-content-danger-default#b42318
--px-menu-item-iconcolor-content-neutral-secondary#475467
--px-menu-sectioncolor-content-neutral-tertiary#667085
--px-menu-radiusradius-1212px
--px-menu-item-radiusradius-88px
--px-menu-paddingspacing-xs4px
--px-menu-item-padding-xspacing-1212px
--px-menu-item-gapspacing-sm8px
--px-menu-item-height-smcontrol-height-sm32px
Show all 18 tokens
TokenAliasLight value
--px-menu-item-height-mdcontrol-height-md40px
--px-menu-width240px240px
--px-command-width640px640px
--px-command-hintcolor-content-neutral-tertiary#667085

Accessibility

  • Arrow keys move, Enter runs, Escape closes.