Skip to content

Command Palette Item

@astryxdesign/core v0.7.1 · CommandPaletteItem

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

ElementDescription
ItemThe option root that carries selection, disabled, item identity, interaction, and theme state.
ContentCaller-provided non-interactive label and supporting presentation.

Best practices ​

GuidancePractices
DoKeep each value unique within the result list so highlight, active-descendant identity, and selection resolve to the same item.
DoUse non-interactive child content such as icons, descriptions, and shortcut hints; activate the option itself instead of nesting buttons or links.
Don'tTreat 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.