GhostSelect reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Headless single- or multiple-value listbox combobox root with v-model, hidden form input(s), and overlay listbox content.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
defaultOpen | boolean | false | No | Initial open state. |
defaultValue | GhostSelectValueInput<Multiple> | — | No | Uncontrolled seed and reset value. |
disabled | boolean | false | No | Disables the control. |
form | string | — | No | Declared prop `form`. |
invalid | boolean | false | No | `aria-invalid` on the trigger. |
messages | GhostSelectMessages | — | No | Overridable internal strings (`required` validation message, default `'Select a value.'`; `listSeparator`, default `', '`). |
modelValue | GhostSelectValueInput<Multiple> | — | No | Controlled value. |
multiple | Multiple | — | No | Enables multiple-value selection in `string[]`. Read once at setup. |
name | string | — | No | Submit input name. |
open | boolean | — | No | Controlled listbox open state. |
placeholder | string | — | No | Shown when no value is selected. |
required | boolean | false | No | Required when `name` is set. |
Emits
None declared.
Models
| Prop | Event | Type | Description |
|---|---|---|---|
modelValue | update:modelValue | GhostSelectValueInput<Multiple> | v-model binding for `modelValue`. |
open | update:open | boolean | v-model binding for `open`. |
Slots
| Name | Description |
|---|---|
default | Primary content. |
Slot props: default
None declared.
Exposed members
| Name | Type | Description |
|---|---|---|
blur | () => void | Exposed method `blur`. |
element | HTMLElement | null | Exposed property `element`. |
focus | (options?: FocusOptions) => void | Exposed method `focus`. |
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | trigger | Combobox control from GhostSelectTrigger. |
data-part | content | Portaled listbox surface from GhostSelectContent. |
data-part | option | Selectable option from GhostSelectOption. |
data-part | value | Selected label from GhostSelectValue. |
data-state | open | Listbox is expanded. |
data-state | checked | Option or value reflects the current selection. |
CSS variables
None declared.
Accessibility
Role: combobox. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/.
Required ARIA attributes: aria-expanded, aria-controls, aria-haspopup, aria-selected.
Keyboard
| Key | Action | Automated browser test |
|---|---|---|
ArrowDown | Opens the listbox or moves among options. | Not reviewed |
ArrowUp | Opens the listbox toward the last option or moves among options. | Not reviewed |
Enter | Opens the listbox or selects the focused option. | Not reviewed |
Space | Opens the listbox or selects the focused option. | Not reviewed |
Escape | Closes the listbox and restores focus to the trigger. | Not reviewed |
Home | Moves focus to the first enabled option. | Not reviewed |
End | Moves focus to the last enabled option. | Not reviewed |
Verification
Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.
| Category | Status | Evidence |
|---|---|---|
| Automated keyboard | Not reviewed | No declared key is mapped to a browser test yet. |
| Manual interaction | Not reviewed | No review recorded. |
| Assistive technology | Not reviewed | No review recorded. |
Examples
select/basic
Single-value combobox with listbox options, typeahead, and portaled content.
select/field
GhostField wiring for label, description, and required state.
select/form
Hidden input submit value and native form reset.