Command Palette Item
@astryxdesign/core v0.7.1 · CommandPaletteItem
Save FileCtrlS
Find in FilesCtrl⇧F
Command PaletteCtrl⇧P
Toggle Terminal⌃`
Toggle SidebarCtrlB
Usage
Use CommandPaletteItem for one non-interactive result row inside CommandPaletteList or CommandPaletteGroup. CommandPalette owns the composite keyboard model; standalone items expose only their explicit visual state and pointer activation.
ts
import { CommandPaletteItem } from '@astryx-vue/core/CommandPalette'Anatomy
| Element | Description |
|---|---|
| Item | The option root that carries selection, disabled, item identity, interaction, and theme state. |
| Content | Caller-provided non-interactive label and supporting presentation. |
Best practices
| Guidance | Practices |
|---|---|
| Do | Keep each value unique within the result list so highlight, active-descendant identity, and selection resolve to the same item. |
| Do | Use non-interactive child content such as icons, descriptions, and shortcut hints; activate the option itself instead of nesting buttons or links. |
| Don't | Treat isHighlighted as selection. Highlight is the active keyboard result; isSelected represents the chosen value. |
Examples
Common configurations, variations, and states.
Basic
New File
Open Recent
Save All
Publish (disabled)
Selectable command palette items inside a CommandPaletteList, including highlighted and disabled states. Use when composing a palette manually instead of a search source.