SegmentedControl
A single-select, always-one-selected control that switches between a small
set of visible options - a view or mode switcher rendered as a pill of
segments. Built on Base UI ToggleGroup (single-select) but kept permanently
selected: re-clicking the active segment never clears it.
Compose it from {@link SegmentedControlItem}s; shared size / fullWidth /
active state flow to them through context. Controlled via value, or
uncontrolled via defaultValue. Items scroll horizontally with a trailing
fade hint when they overflow.
Usage
Best practices
One value is always selected - the active segment cannot be deselected; for deselectable or multi-select sets reach for ToggleGroup.
Switching visible content panels is Tabs; navigating URLs is TabNavigation - SegmentedControl is an input that selects a value or mode.
Icon-only items must carry an
aria-label.
Props
SegmentedControl
SegmentedControlItem
Also exports
- const
segmentedControlAnatomy - interface
SegmentedControlItemProps - type
SegmentedControlProps
Anatomy
Composition
Builds on
Dot, Flex, Icon, ScrollArea, ScrollFade
Used by