‮Skip to content‬
uiify

Segmented control

‮Row of segments for choosing exactly one option.‬

‮Browsers‬
Chrome 123+Firefox 121+Safari 17.5+
‮Tier‬
0
‮Bundle compressed‬
995 B
‮Forced layout budget‬
0 ms
‮Axe budget‬
0
‮SSR compatible‬
‮Yes‬
‮Built on‬
elements/choice
‮Published contract‬
‮Test harness‬

‮Playground‬

Segmented Control

‮Default‬

‮API‬

SegmentedControl

‮Prop‬‮Type‬‮Default‬‮Description‬
id*string—‮Base for the deterministic ids and the shared radio group name.‬
items*readonly SegmentedControlItem[]—‮Each item is { value, label, disabled? }.‬
defaultValuestring | undefined—‮Selected on first render. Uncontrolled, so it survives with no JavaScript.‬
valuestring—‮Controlled value on SegmentedControlClient.‬
onValueChange(value: string) => void—‮Change callback on SegmentedControlClient.‬
disabledbooleanfalse‮Disables every segment and marks the group with data-disabled.‬
aria-label / aria-labelledbystring—‮Accessible name for the radiogroup; provide one when no visible group label exists.‬
orientation"horizontal" | "vertical""horizontal"‮Direction the segments are laid out in.‬
fullWidthbooleanfalse‮Sets data-full-width on the root so segments stretch to fill their container.‬
classNamestring—‮Class applied to the group root.‬

‮Keyboard‬

‮Key‬‮Action‬
Tab‮Move focus to the group‬
Arrow keys‮Rove between segments‬
Space‮Select the focused segment‬

‮Accessibility‬

‮Single-select native radiogroup built on hidden radio inputs. Use SegmentedControlClient for controlled value/onValueChange behavior.‬

‮Styling hooks‬

data-partdata-disableddata-full-width