FORMS
SegmentedControl
Single-select toggle group with a Memphis border seam between items. Built on Radix ToggleGroup with type="single". Use it for 2-5 mutually exclusive options where keeping the choices visible adds clarity.
Import
Horizontal (default)
Vertical
Props
SegmentedControl props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | Controlled selected value. Pair with onValueChange. |
| defaultValue | string | — | Uncontrolled initial selected value. |
| onValueChange | (value: string) => void | — | Fires whenever the selection changes. |
| orientation | 'horizontal' | 'vertical' | 'horizontal' | Layout axis. |
| aria-label | string | — | Required when there is no surrounding visible label. |
| disabled | boolean | — | Disables every item in the group. |
Accessibility
- The root renders
role="group"with each item asrole="radio"+aria-checked(Radix ToggleGrouptype="single"uses the radio pattern under the hood). aria-label(oraria-labelledby) on the root is required: without it the group has no accessible name, and screen readers will announce the items without context.- Keyboard: Tab moves focus into the currently selected item (roving tabindex); arrow keys cycle items and move the selection; Tab again moves focus out of the entire group.
SegmentedControl vs RadioGroup
- Reach for SegmentedControl when 2-5 options fit on one line and the control acts more like a tab strip than a form input.
- Reach for RadioGroup when you have many options or want each option on its own line with descriptions.