Horizontal
Single-row segmented control for 2–5 segments.
All segments share equal width. The animated pill indicator always uses SegmentedControlShape.Pill (fully rounded); the shape is not configurable on this variant because the outer container is also pill-shaped.
Parameters
Zero-based index of the currently selected segment. Must be in 0 until segmentCount; throws IllegalArgumentException otherwise.
The Role used for the segments. Defaults to Role.RadioButton to represent single selection but if you use the SegmentedControl to completely change the layout use bellow it then use Role.Tab
Modifier applied to the outermost Column that wraps the optional header and the control track.
When false all segments ignore input and their ripple is suppressed.
Composable that draws the selection indicator. Receives the current selectedIndex so callers can vary the appearance per selection — useful for value scales such as energy ratings. Defaults to SegmentedControlDefaults.Indicator.
Segment declarations using SegmentedControlScope. Every call to a scope function adds one segment; call them in display order. Requires 2–5 calls.