Skip to content

Segmented Control

A segmented control is a UI component that allows users to switch between two or more options by tapping segments arranged in a single line. Each segment represents a distinct view, category, or mode.

Segmented controls are best used when users need to make quick, mutually exclusive choices without navigating away from the current context, for example, switching between List and Grid views, or filtering content by categories.

Common alternative names:
Tabs, Segments, Option Switcher, Toggle Group


A simple two-option segmented control.


A three-option segmented control for more choices.


A four-option segmented control.


A five-option segmented control for maximum choices.


PropertyTypeDescription
segmentsListThe list of segment data to display.
selectedIndexintThe index of the currently selected segment.
onSelectionChangedValueChanged<int>?Callback function called when selection changes. Receives the selected index.
heightdoubleThe height of the segmented control.
borderRadiusBorderRadiusGeometry?The border radius to apply to the control.
backgroundColorColor?The background color of the control. Uses theme-appropriate default if null.
selectedColorColor?The color of the selected segment. Defaults to white.
unselectedTextColorColor?The text color for unselected segments. Uses theme-appropriate default if null.
selectedTextColorColor?The text color for the selected segment. Uses theme-appropriate default if null.
paddingEdgeInsetsGeometryThe padding around the entire control.
segmentPaddingEdgeInsetsGeometry?The padding inside each segment. Optional.