Skip to content

GhostToolbar reference ​

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

Headless APG toolbar container. useGhostToolbar owns role and orientation semantics; useRovingFocus moves among focusable slot children. Themed flex layout lives on @ghostvue/themes.

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

All component references

Props ​

NameTypeDefaultRequiredDescription
asGhostToolbarElement"div"NoRoot element tag for the toolbar container.
dirGhostToolbarDirection—NoOptional text direction for horizontal arrow reversal in RTL.
labelstring—NoAccessible name via aria-label when a visible label element is not used.
loopbooleantrueNoWrap arrow and Home/End movement from last enabled item to first.
orientationGhostToolbarOrientation"horizontal"NoToolbar layout and roving arrow axis. Sets aria-orientation when vertical.

Emits ​

None declared.

Models ​

None declared.

Slots ​

NameDescription
defaultToolbar items such as GhostButton, GhostSwitch, and GhostSeparator.

Slot props: default ​

None declared.

Exposed members ​

NameTypeDescription
blur() => voidExposed method `blur`.
elementHTMLElement | nullRoot element after mount; null before mount.
focus(options?: FocusOptions) => voidExposed method `focus`.

Parts and data attributes ​

AttributeValueDescription
data-partrootToolbar container with role=toolbar.
data-orientationhorizontal, verticalResolved orientation on the root. Always present.

CSS variables ​

None declared.

Accessibility ​

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

Required ARIA attributes: aria-label.

Keyboard ​

KeyActionAutomated browser test
ArrowLeftPrevious enabled item when orientation is horizontal (flipped in RTL).Not reviewed
ArrowRightNext enabled item when orientation is horizontal (flipped in RTL).Not reviewed
ArrowUpPrevious enabled item when orientation is vertical.Not reviewed
ArrowDownNext enabled item when orientation is vertical.Not reviewed
HomeFirst enabled item.Not reviewed
EndLast enabled item.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 ​

toolbar/basic ​

Example source

Basic Headless

Horizontal action bar with roving focus among buttons.

toolbar/composable ​

Example source

Composable Headless

Same contract as GhostToolbar on a native host.

toolbar/vertical ​

Example source

Vertical Headless

Vertical toolbar with up and down arrow movement.

toolbar/separators ​

Example source

Separators Headless

Group controls with semantic vertical separators.