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.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
defaultOpen | boolean | false | No | Initial open state when `open` is omitted. |
disabled | boolean | false | No | Disables toggling on the trigger when `true`. |
open | boolean | — | No | Controlled open state. Omit for uncontrolled mode. |
Emits
None declared.
Models
| Prop | Event | Type | Description |
|---|---|---|---|
open | update:open | boolean | v-model binding for `open`. |
Slots
| Name | Description |
|---|---|
default | Trigger and content parts plus optional custom UI reading scoped state. |
Slot props: default
| Name | Type | Description |
|---|---|---|
open | boolean | Slot prop `open`. |
toggle | () => void | Slot prop `toggle`. |
Exposed members
None declared.
Parts and data attributes
| Attribute | Value | Description |
|---|---|---|
data-part | trigger | Disclosure control rendered by GhostCollapsibleTrigger. |
data-part | content | In-flow panel rendered by GhostCollapsibleContent. |
data-state | open | Applied on data-state while the panel is expanded. |
data-state | closed | Applied 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
| Key | Action | Automated browser test |
|---|---|---|
Enter | Toggles disclosure on GhostCollapsibleTrigger (non-button hosts). | Not reviewed |
Space | Toggles 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.
| 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
collapsible/basic
Collapsible disclosure Headless
Headless trigger and content linked with aria-controls.