Segmented Control

A single-select control for choosing one option from a small set, drawn as a recessed track of raised segments. Built on the Radix UI Tabs primitive — the picker only, so the selection drives your own content.

A flat, sortable list of every task.

Sizes

size="sm" shortens the segments and steps the label down one type size — useful inside toolbars and card headers.

Full Width

fullWidth stretches the track across its container and gives every segment an equal share of the width.

Disabled

Pass disabled on a SegmentedControlItem to rule out one option, or on SegmentedControl to disable them all.

Installation

Props

Built on Radix UI Tabs, so keyboard navigation follows the tab list pattern.

PropTypeDefaultDescription
value
stringThe controlled value of the selected segment.
defaultValue
stringThe segment selected by default when uncontrolled.
onValueChange
(value: string) => voidCalled when the selected segment changes.
size
"default" | "sm""default"Height and type size of every segment.
fullWidth
booleanfalseFill the container, splitting the width equally between segments.
disabled
booleanfalseDisable the whole control.
Item.value*
stringOn SegmentedControlItem: the value this segment selects.
Item.disabled
booleanfalseOn SegmentedControlItem: make just this segment non-interactive.