Skip to content

GhostToggleGroup reference ​

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

Themed segmented GhostToggleGroup root with default elevation and layout styles.

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

All component references

Props ​

NameTypeDefaultRequiredDescription
size'sm' | 'md' | 'lg'"md"NoTrack height, label size, and item padding from `control.size.<size>`, matching a GhostButton or GhostInput of the same size. Items take the root size. The default omits data-size so CSS can treat a missing hook as md.

Emits ​

None declared.

Models ​

None declared.

Slots ​

NameDescription
defaultToggle group items.

Slot props: default ​

None declared.

Exposed members ​

NameTypeDescription
elementHTMLElement | nullHeadless group root element.
focus(options?: FocusOptions) => voidFocus the primary item tab stop.
blur() => voidBlur the focused item within the group.

Parts and data attributes ​

AttributeValueDescription
data-partrootSegmented group container.
data-sizesm, lgControl size on the toggle group track. Absent for the default md size.

CSS variables ​

NameDescription
--ghost-elevation-1-bgGroup track background.
--ghost-elevation-2-bgPressed item surface.

Accessibility ​

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

Required ARIA attributes: none.

Keyboard ​

None declared.

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 ​

toggle-group/editor-toolbar ​

Example source

Announcement draft

Single-select alignment and multi-select formatting with GhostToggleGroup.

Announcement draft

Combine single-select alignment with multi-select text formatting.

Scheduled maintenance completes Sunday at 04:00 UTC with zero expected downtime for read replicas.

Alignment: left · Formatting: bold

toggle-group/themed ​

Example source

Toggle group themed

Segmented layout switcher with default styles.

toggle-group/size ​

Example source

Size

Small toggle group in a reply bar beside a small input and button.