Skip to content

GhostCombobox reference ​

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

Headless editable combobox with list autocomplete, consumer-owned filtering, async loading hooks, and single or multiple selection.

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

All component references

Props ​

NameTypeDefaultRequiredDescription
allowDeselectbooleanfalseNoDeclared prop `allowDeselect`.
defaultOpenbooleanfalseNoInitial open state.
defaultSearchstring""NoInitial query when `search` is omitted.
defaultValueGhostComboboxValue—NoUncontrolled seed and reset value.
disabledbooleanfalseNoDisables input, trigger, and options.
formstring—NoDeclared prop `form`.
invalidbooleanfalseNo`aria-invalid` on the input.
loadingbooleanfalseNoHides empty slot; sets listbox `aria-busy`.
messagesGhostComboboxMessages—NoDeclared prop `messages`.
modelValueGhostComboboxValue—NoControlled selection; `undefined` clears.
multiplebooleanfalseNoMulti-select toggles membership in `string[]`.
namestring—NoSubmit input name.
openboolean—NoControlled listbox open state.
placeholderstring—NoInput placeholder (wins over the input's own).
requiredbooleanfalseNoRequired when `name` is set.
searchstring—NoControlled query in the input.
virtualizedbooleanfalseNoDeclared prop `virtualized`.

Emits ​

NamePayloadDescription
search{ query: string; requestId: number; }Emitted as `search`.

Models ​

PropEventTypeDescription
modelValueupdate:modelValueGhostComboboxValuev-model binding for `modelValue`.
openupdate:openbooleanv-model binding for `open`.
searchupdate:searchstringv-model binding for `search`.

Slots ​

NameDescription
defaultContainer content.

Slot props: default ​

None declared.

Exposed members ​

NameTypeDescription
blur() => voidExposed method `blur`.
elementHTMLElement | nullRoot element after mount; null before mount.
focus(options?: FocusOptions) => voidExposed method `focus`.

Parts and data attributes ​

AttributeValueDescription
data-partinputEditable combobox control from GhostComboboxInput.
data-partcontentPortaled listbox surface from GhostComboboxContent.
data-partoptionSelectable option from GhostComboboxOption.
data-partemptyEmpty state from GhostComboboxEmpty when no options are registered.
data-stateopenListbox is expanded.
data-statecheckedOption reflects the current selection.

CSS variables ​

None declared.

Accessibility ​

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

Required ARIA attributes: aria-expanded, aria-controls, aria-autocomplete, aria-activedescendant, aria-selected.

Keyboard ​

KeyActionAutomated browser test
ArrowDownOpens the listbox or moves the active option highlight.GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes)
ArrowUpOpens the listbox or moves the active option highlight.GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes)
EnterSelects the highlighted option.GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes)
EscapeCloses the listbox.GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes)
HomeHighlights the first enabled option.GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes)
EndHighlights the last enabled option.GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes)
TabMoves to the trigger, or out of the widget; leaving the input, trigger, and content closes the listbox without restoring focus and resets the search (selected label in single mode, empty in multiple mode).GhostCombobox › focus departure (GHO-166) › inline content with trigger: Tab, Shift+Tab, external focus, and pointer selection (@ghostvue/themes)
Shift+TabMoves to the previous focusable element; leaving the widget closes the listbox and resets the search like Tab.GhostCombobox › focus departure (GHO-166) › inline content with trigger: Tab, Shift+Tab, external focus, and pointer selection (@ghostvue/themes)

Verification ​

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

CategoryStatusEvidence
Automated keyboardPassedEvery declared key maps to a Chromium browser test that CI runs and requires to pass on every commit.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

combobox/basic ​

Example source

Basic Headless

Editable combobox with client-provided options and keyboard highlight.

combobox/async ​

Example source

Async search Headless

Loading state, empty results, and stale-response guard with useGhostComboboxAsyncSearch.

combobox/multi ​

Example source

Multiple Headless

Toggle multiple values without closing the listbox.

combobox/field ​

Example source

Field Headless

GhostField wiring for label, description, and required state.

combobox/form ​

Example source

Form Headless

Hidden input submit value and native form reset.

combobox/themed ​

Example source

Themed

Input and list surface tokens from @ghostvue/themes.