GhostTreeTrigger reference
Package: @ghostvue/vue. Status: experimental (stability policy).
Non-focusable row or disclosure target (default <span>, no role or tabindex) inside GhostTreeItem, so the tree has no nested interactive controls. action="both" selects and toggles (with expandOnClick), "toggle" only toggles expansion, "select" only selects. Non-toggle triggers label the item through aria-labelledby; focus() delegates to the owning item.
Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
action | GhostTreeTriggerAction | "both" | No | Pointer click behavior: select and toggle, toggle only, or select only. |
as | GhostTreeTriggerElement | "span" | No | Tag name or component for the non-focusable row or disclosure target. |
disabled | boolean | false | No | Local disable flag, combined with the item and root `disabled`. |
Emits
None declared.
Models
None declared.
Slots
| Name | Description |
|---|---|
default | Visible label and decorative (aria-hidden) affordances such as a chevron. |
Slot props: default
| Name | Type | Description |
|---|---|---|
disabled | boolean | Slot prop `disabled`. |
expandable | boolean | Slot prop `expandable`. |
expanded | boolean | Slot prop `expanded`. |
level | number | Slot prop `level`. |
select | () => void | Slot prop `select`. |
selected | boolean | Slot prop `selected`. |
toggle | () => void | Slot prop `toggle`. |
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 | Row or disclosure target rendered by GhostTreeTrigger. |
data-state | open | Owning branch is expanded. |
data-state | closed | Owning branch is collapsed. |
data-state | checked | Owning leaf item is selected. |
data-selected | present | Present while the owning item is selected. |
data-disabled | present | Present when the trigger, its item, or the tree is disabled. |
CSS variables
None declared.
Accessibility
Role: generic. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/treeview/.
Required ARIA attributes: none.
Keyboard
| Key | Action | Automated browser test |
|---|---|---|
Enter | Handled by the owning treeitem; the trigger itself is never focused. | 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
None declared.