Skip to content

GhostCommandPaletteItem reference ​

Package: @ghostvue/vue. Status: experimental (stability policy).

One command (role="option") identified by its required id. Enter on the highlight or a primary click emits command with { id }; disabled items stay visible but are skipped. Duplicate ids log GHOST012.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
asGhostCommandPaletteItemElement—NoTag name or component rendered for the option.
disabledbooleanfalseNoExcluded from highlight and activation.
idstring—YesStable command identity, unique within the palette; emitted on `command`.
textValuestring—NoPlain-text label for assistive technology; falls back to the item's text.

Emits ​

None declared.

Models ​

None declared.

Slots ​

NameDescription
defaultPrimary content.

Slot props: default ​

None declared.

Exposed members ​

NameTypeDescription
blur() => voidExposed method `blur`.
elementHTMLElement | nullExposed property `element`.
focus(options?: FocusOptions) => voidExposed method `focus`.

Parts and data attributes ​

AttributeValueDescription
data-partitemOption with class ghost-command-palette-item, data-part="item", and data-value set to the id.
data-stateactiveHighlighted (also data-highlighted).
data-statedisabledCannot be highlighted or activated.

CSS variables ​

None declared.

Accessibility ​

Role: option. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-list/.

Required ARIA attributes: aria-selected, aria-disabled.

Keyboard ​

None declared.

Verification ​

Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

None declared.