Skip to content

GhostAccordion ​

GhostAccordion coordinates multiple in-flow disclosure panels following the WAI-ARIA APG Accordion pattern. Each panel reuses GhostCollapsible for open state and semantics. Import it from @ghostvue/themes for default styling, as every example on the ordinary path below does. For unstyled use from @ghostvue/vue, see Advanced: headless composition.

Release policy ​

Deployment policy FAQ

Multiple-expansion release policy accordion with expand/collapse actions and responsive header.

Production release policy 3 sections
Standard operating procedures for rollbacks, regions, and audit logs.

Previous container digests remain pinned for 72 hours after promotion so traffic shifts back in under 15 seconds.

Multiple-expansion mode coordinates a controlled string[] of open section values alongside external expand/collapse actions. The header adapts to the preview width with @container ghost-demo.

One answer at a time ​

Billing questions

Single collapsible expansion with a decorative plus/minus indicator that follows aria-expanded.

Billing questions

On the first day of each billing period. The receipt goes to the billing contact on the account.

type="single" with collapsible keeps at most one answer open and lets the reader close the open one again. Focus a question and press ArrowDown, ArrowUp, Home, or End to move between headers, then Enter or Space to expand it. Opening a second question closes the first, and each trigger's aria-expanded follows. Every header stays in the tab sequence; the arrow keys only move focus.

The plus/minus is consumer markup inside the trigger. It is decorative and carries aria-hidden="true" because the trigger already exposes its state through aria-expanded. Its CSS reads that attribute, so the visible indicator and the announced state cannot drift apart.

Multiple expansion ​

Themed accordion

Multiple expansion with default surface styles.

Reserved stock releases when payment clears or the hold expires.

type="multiple" tracks a string[] of open item values. Themed examples load default.css and reuse collapsible trigger and panel surfaces. The themed root and items add data-themed, so loading the stylesheet does not restyle headless accordions on the same page.

Accessibility ​

  • Disclosure triggers sit in programmatic headings with aria-expanded and aria-controls.
  • Arrow keys, Home, and End optionally move focus among direct triggers (no roving tabindex).
  • Non-collapsible single mode sets aria-disabled="true" on the open trigger.
  • Root and item disabled prevent toggling.

Advanced: headless composition ​

Use this section when your team brings its own design system. Import the same parts from @ghostvue/vue; they keep the behavior and ARIA wiring and render no visual treatment.

Basic use ​

Accordion sections Headless

Single expansion with collapsible coordination over panels.

Carriers schedule pickup across the west coast hubs every weekday.

The unstyled accordion has the same single-expansion contract as the billing questions above. You own the trigger, panel, focus ring, and any indicator styling.

API ​

See the generated component references for props, emits, slots, exposed members, styling hooks, and executable examples.

PropTypeDefaultDescription
collapsiblebooleanfalseWhen type is single, allow closing the active panel.
defaultValueGhostAccordionValue—Initial expansion when modelValue is omitted.
disabledbooleanfalseDisables toggling on every item when true.
headingLevelGhostAccordionHeadingLevel3Heading level wrapping each accordion trigger (h1–h6).
modelValueGhostAccordionValue—Controlled expansion value. Omit for uncontrolled mode.
typeGhostAccordionType"single"Single or multiple expanded panels.
SlotSlot propsDescription
default—Accordion items.

@ghostvue/themes adds no props, events, or slots to the headless GhostAccordion API, which it forwards.

GhostAccordion (root) ​

Emits update:modelValue with string | string[] | undefined depending on type. Delegates optional arrow-key navigation among direct item triggers.

GhostAccordionItem ​

Wraps GhostCollapsible with controlled :open from the root modelValue.

GhostAccordionTrigger ​

Renders a heading (h1–h6 via root headingLevel) around GhostCollapsibleTrigger.

GhostAccordionContent ​

Proxies GhostCollapsibleContent with the same hidden and aria-labelledby behavior.

Specification ​

See GhostAccordion specification.