Segmented Control
Mutually exclusive option selector. Each segment is a button; only one can be active at a time. Supports icon + label, size variants, and disabled segments.
Anatomy
1
2
- 1 Track — pill-shaped container that groups all segments
- 2 Segment — individual button; active segment has an elevated indicator
Options
States
Size variants
Icon + label
Table of options
| Property | Values | Default |
|---|---|---|
| ariaLabel | string | — |
| size | sm / md / lg | md |
| label | string | — |
| selected | true / false | false |
| disabled | true / false | false |
| icon | icon name / none | none |
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Moves focus into/out of the segmented control |
| ← / → | Moves between segments |
| Enter / Space | Activates the focused segment |
Accessibility
- The container uses
role="group"witharia-labelto describe the purpose. - Each segment uses
aria-pressedto communicate selected state. - Disabled segments carry
disabledandaria-disabled="true".
Design checklist
All brand/mode contextsWorks across light and dark modes.
Keyboard interactionsArrow key navigation within group.
Design tokensComponent-scoped tokens (
--uif-segmented-control-*).Size variantssm, md (default), lg.
Disabled segmentsIndividual segments can be disabled.