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.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
allowDeselect | boolean | false | No | Declared prop `allowDeselect`. |
defaultOpen | boolean | false | No | Initial open state. |
defaultSearch | string | "" | No | Initial query when `search` is omitted. |
defaultValue | GhostComboboxValue | — | No | Uncontrolled seed and reset value. |
disabled | boolean | false | No | Disables input, trigger, and options. |
form | string | — | No | Declared prop `form`. |
invalid | boolean | false | No | `aria-invalid` on the input. |
loading | boolean | false | No | Hides empty slot; sets listbox `aria-busy`. |
messages | GhostComboboxMessages | — | No | Declared prop `messages`. |
modelValue | GhostComboboxValue | — | No | Controlled selection; `undefined` clears. |
multiple | boolean | false | No | Multi-select toggles membership in `string[]`. |
name | string | — | No | Submit input name. |
open | boolean | — | No | Controlled listbox open state. |
placeholder | string | — | No | Input placeholder (wins over the input's own). |
required | boolean | false | No | Required when `name` is set. |
search | string | — | No | Controlled query in the input. |
virtualized | boolean | false | No | Declared prop `virtualized`. |
Emits
| Name | Payload | Description |
|---|---|---|
search | { query: string; requestId: number; } | Emitted as `search`. |
Models
| Prop | Event | Type | Description |
|---|---|---|---|
modelValue | update:modelValue | GhostComboboxValue | v-model binding for `modelValue`. |
open | update:open | boolean | v-model binding for `open`. |
search | update:search | string | v-model binding for `search`. |
Slots
| Name | Description |
|---|---|
default | Container content. |
Slot props: default
None declared.
Exposed members
| Name | Type | Description |
|---|---|---|
blur | () => void | Exposed method `blur`. |
element | HTMLElement | null | Root element after mount; null before mount. |
focus | (options?: FocusOptions) => void | Exposed method `focus`. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | input | Editable combobox control from GhostComboboxInput. |
data-part | content | Portaled listbox surface from GhostComboboxContent. |
data-part | option | Selectable option from GhostComboboxOption. |
data-part | empty | Empty state from GhostComboboxEmpty when no options are registered. |
data-state | open | Listbox is expanded. |
data-state | checked | Option 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
| Key | Action | Automated browser test |
|---|---|---|
ArrowDown | Opens the listbox or moves the active option highlight. | GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes) |
ArrowUp | Opens the listbox or moves the active option highlight. | GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes) |
Enter | Selects the highlighted option. | GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes) |
Escape | Closes the listbox. | GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes) |
Home | Highlights the first enabled option. | GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes) |
End | Highlights the last enabled option. | GhostCombobox › keyboard interaction, highlight, multi-toggle, and axe (@ghostvue/themes) |
Tab | Moves 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+Tab | Moves 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.
| Category | Status | Evidence |
|---|---|---|
| Automated keyboard | Passed | Every declared key maps to a Chromium browser test that CI runs and requires to pass on every commit. |
| Manual interaction | Not reviewed | No review recorded. |
| Assistive technology | Not reviewed | No review recorded. |
Examples
combobox/basic
Editable combobox with client-provided options and keyboard highlight.
combobox/async
Loading state, empty results, and stale-response guard with useGhostComboboxAsyncSearch.
combobox/multi
Toggle multiple values without closing the listbox.
combobox/field
GhostField wiring for label, description, and required state.
combobox/form
Hidden input submit value and native form reset.
combobox/themed
Input and list surface tokens from @ghostvue/themes.