Skip to content

GhostSegmentedControl reference ​

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

Themed GhostSegmentedControl root with sliding indicator and equal-width segments.

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 segment padding from `control.size.<size>`, matching a GhostButton or GhostInput of the same size. Segments 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
defaultSegment 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 track.
data-partindicatorSliding thumb behind items.
data-sizesm, lgControl size on the segmented track. Absent for the default md size.

CSS variables ​

NameDescription
--ghost-elevation-2-bgIndicator surface.
--ghost-motion-duration-fastIndicator slide duration; disabled under reduced motion.

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 ​

segmented-control/analytics-period ​

Example source

API traffic

Time window and metric switchers with GhostSegmentedControl.

API traffic

Switch time windows or metric series with arrow keys.

984.2k

+11.6% vs prior 7d

Steady weekday traffic across EU and US.

segmented-control/themed ​

Example source

Segmented control themed

Token-driven thumb with reduced-motion support.

segmented-control/size ​

Example source

Size

Small segmented control in a toolbar beside a small input and button.