RRigdesign system
Inputs

Toggle button

A segmented control for switching between mutually exclusive views or modes.

Examples

Two and three segments (aria-pressed)

States

Rendered states (visual reference; the live example above is the accessible one)
DefaultHoverFocus visiblePressedDisabled
Segmented

Anatomy

Toggle button anatomy
#PartDescriptionPresence
1TrackGlass (light) or solid (dark) baseRequired
2Segment2 to 4 buttons, each with aria-pressedRequired
3Active indicatorFilled pill behind the active segmentRequired

Specifications

Segments2, 3 or 4, with uniform inner padding
SurfaceFrosted glass base on light, solid base on dark

Interaction

Keyboard
KeyResult
TabMoves into the group, then to the next control
Space EnterPresses the focused segment
← →Optional: moves focus between segments
Pointer and touch
TriggerResponse
PressIndicator slides to the segment in 200ms ease-out
HoverOverlay at 10% on inactive segments

Accessibility

role · group of buttons

1.4.1Use of Colour2.1.1Keyboard4.1.2Name, Role, Value
Requirements
RequirementHow Rig meets it
Semanticsrole="group" with an aria-label, each segment a button with aria-pressed. For a true single choice, use Radio button.
StateActive is shown by fill and weight, not colour alone
Reduced motionThe slide becomes an instant change

Read the matching WAI pattern ↗

Usage

Do and don’t
DoDon’t
Use for view modes such as List and GridDo not use it to submit or navigate
Keep labels to one wordDo not use more than four segments

Notes from the Figma file

  • Use for view modes (list or grid). For on/off preferences use Switch.