Skip to content

GhostCollapsible reference ​

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

Headless disclosure root provider. Manages controlled/uncontrolled open state via useControllableState and deterministic trigger/content IDs via useGhostId.

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

All component references

Props ​

NameTypeDefaultRequiredDescription
defaultOpenbooleanfalseNoInitial open state when `open` is omitted.
disabledbooleanfalseNoDisables toggling on the trigger when `true`.
openboolean—NoControlled open state. Omit for uncontrolled mode.

Emits ​

None declared.

Models ​

PropEventTypeDescription
openupdate:openbooleanv-model binding for `open`.

Slots ​

NameDescription
defaultTrigger and content parts plus optional custom UI reading scoped state.

Slot props: default ​

NameTypeDescription
openbooleanSlot prop `open`.
toggle() => voidSlot prop `toggle`.

Exposed members ​

None declared.

Parts and data attributes ​

AttributeValueDescription
data-parttriggerDisclosure control rendered by GhostCollapsibleTrigger.
data-partcontentIn-flow panel rendered by GhostCollapsibleContent.
data-stateopenApplied on data-state while the panel is expanded.
data-stateclosedApplied on data-state while the panel is collapsed.

CSS variables ​

None declared.

Accessibility ​

Role: generic. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/.

Required ARIA attributes: aria-expanded, aria-controls.

Keyboard ​

KeyActionAutomated browser test
EnterToggles disclosure on GhostCollapsibleTrigger (non-button hosts).Not reviewed
SpaceToggles disclosure on GhostCollapsibleTrigger (non-button hosts).Not reviewed

Verification ​

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

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

collapsible/basic ​

Example source

Collapsible disclosure Headless

Headless trigger and content linked with aria-controls.