SegmentedControl

Mutually exclusive toggle group

Category: inputs · WCAG 2.2-AA · form, toggle, group, segmented, input

Sizes

States

Props

PropTypeDefaultDescription
optionsSegmentedControlOption[]The selectable options.
valuestringThe controlled value.
onValueChange(v: string) => voidCalled with the new value when it changes.
size'sm' | 'md' | 'lg'mdVisual size of the component (e.g. 'sm', 'md', 'lg').
disabledbooleanfalseWhen true, disables the control and removes it from the tab order.
ariaLabelstringAccessible name for the group. Invisible — it names the role="group" and renders nothing. The raw DOM `aria-label` still wins over this.
labelstringAlias of `ariaLabel` — same invisible accessible name, the other spelling. Not rendered.

Design tokens

When to use

When not to use

How to build an accessible SegmentedControl in React →

Examples

Basic

<SegmentedControl options={[{label:'Day',value:'day'},{label:'Week',value:'week'},{label:'Month',value:'month'}]} value="day" onValueChange={() => {}} />

Related components

← Back to docs