Skip to content

Command

Overlay

A ⌘K-style command palette for quick navigation, action execution, and search. Opens with a keyboard shortcut and provides fuzzy-filtered, grouped results.

atlas-command

Examples

Command palette

Opens with Ctrl+K / ⌘K or through [(open)] ; type to filter, Enter to run.

or press Ctrl+K · last: —

Custom shortcut and texts

shortcut="j" opens this palette with Ctrl+J / ⌘J instead of K. placeholder , emptyText and ariaLabel replace the configured texts; items can show a description and a shortcut hint.

Last: —

API

Generated from the library source, so it always matches the code.

AtlasCommandComponent atlas-command

InputTypeDefaultDescription
items requiredCommandItem[]— The commands; typing filters them by label and description. An item with a group is listed under that group.
groups CommandGroup[][] Group headings, in display order; items whose group matches a key are listed under it.
open two-waybooleanfalse Whether the palette is open (two-way). The shortcut opens it; Escape, the backdrop and choosing a command close it.
placeholder string | undefinedundefined Search placeholder. Defaults to the configured command.placeholder .
emptyText string | undefinedundefined Message when nothing matches (announced). Defaults to the configured command.emptyText .
ariaLabel string | undefinedundefined Accessible name of the palette dialog. Defaults to the configured command.label .
shortcut string'k' Key that opens the palette with Ctrl (Windows, Linux) or ⌘ (macOS). Default: k .
OutputPayloadDescription
selectCommandSelectEvent Emits the chosen command; the palette then closes.
closedvoid Emits when the palette closes, whatever the reason.

Types

CommandGroup

PropertyTypeDescription
key string Group key matching CommandItem.group
label string Display heading

CommandItem

PropertyTypeDescription
id string Unique identifier
label string Display label
description? string Optional description text
icon? string Icon name (e.g. 'atlas:settings')
shortcut? string Keyboard shortcut hint (e.g. '⌘K', 'Ctrl+P')
group? string Group this item belongs to
disabled? boolean Whether the item is disabled
data? unknown Custom data payload

CommandSelectEvent

PropertyTypeDescription
item CommandItem —