Segmented Control
A compact control for switching between mutually exclusive views or options.Import
Anatomy
SegmentedControl.Root
The root container for the segmented control.Size of the segmented control
Visual style variant
default: Standard background with shadowfilled: Semi-transparent filled background with backdrop bluroutline: Border outline with transparent background
The value of the item that should be active by default
The controlled value of the active item
Callback fired when the active item changes
The orientation of the control
Whether items are activated automatically on focus or require explicit activation
Explicit escape hatch for intentional structural overrides
Data Attributes
data-slot="segmented-control"data-size: Current size (xs,s,m)data-variant: Current variant (default,filled,outline)
SegmentedControl.List
Container for the segmented control items and indicator.Explicit escape hatch for intentional structural overrides
Data Attributes
data-slot="segmented-control-list"
SegmentedControl.Item
An individual option within the segmented control.Unique identifier for this item
Icon displayed before the item label
Whether the item is disabled
Explicit escape hatch for intentional structural overrides
Data Attributes
data-slot="segmented-control-item"data-active: Present when the item is activedata-disabled: Present when the item is disabled
SegmentedControl.Indicator
Visual indicator showing the active item.Explicit escape hatch for intentional structural overrides
Data Attributes
data-slot="segmented-control-indicator"
SegmentedControl.Content
Container for the content of a segmented control panel.The value of the item that this content is associated with
Explicit escape hatch for intentional structural overrides
Data Attributes
data-slot="segmented-control-content"