GhostAccordion reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Headless accordion root coordinating single or multiple expansion over GhostCollapsible items with vertical roving focus.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
collapsible | boolean | false | No | When `type` is `single`, allow closing the active panel. |
defaultValue | GhostAccordionValue | — | No | Initial expansion when `modelValue` is omitted. |
disabled | boolean | false | No | Disables toggling on every item when `true`. |
headingLevel | GhostAccordionHeadingLevel | 3 | No | Heading level wrapping each accordion trigger (`h1`–`h6`). |
modelValue | GhostAccordionValue | — | No | Controlled expansion value. Omit for uncontrolled mode. |
type | GhostAccordionType | "single" | No | Single or multiple expanded panels. |
Emits
None declared.
Models
| Prop | Event | Type | Description |
|---|---|---|---|
modelValue | update:modelValue | GhostAccordionValue | v-model binding for `modelValue`. |
Slots
| Name | Description |
|---|---|
default | Accordion items. |
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 | root | Accordion host and roving-focus container. |
CSS variables
None declared.
Accessibility
Role: generic. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/accordion/.
Required ARIA attributes: none.
Keyboard
| Key | Action | Automated browser test |
|---|---|---|
ArrowDown | Move focus to the next accordion trigger. | GhostAccordion @component:GhostAccordion › navigation example keeps tab order and isolates nested headers (@ghostvue/vue)GhostAccordion @component:GhostAccordion › arrow keys move focus between accordion triggers ( @ghostvue/vue) |
ArrowUp | Move focus to the previous accordion trigger. | GhostAccordion @component:GhostAccordion › navigation example keeps tab order and isolates nested headers (@ghostvue/vue)GhostAccordion @component:GhostAccordion › arrow keys move focus between accordion triggers ( @ghostvue/vue) |
Home | Focus the first accordion trigger. | GhostAccordion @component:GhostAccordion › navigation example keeps tab order and isolates nested headers (@ghostvue/vue) |
End | Focus the last accordion trigger. | GhostAccordion @component:GhostAccordion › navigation example keeps tab order and isolates nested headers (@ghostvue/vue) |
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
accordion/basic
Accordion sections Headless
Single expansion with collapsible coordination over panels.
accordion/navigation
Accordion navigation Headless
Tab order across headers and panel links; nested accordion isolation.
accordion/themed
Themed accordion
Multiple expansion with default surface styles.