eQuantic.UIeQuantic.UI
Docs
Playground
GitHub
DocsActions & inputs
SegmentedControl
View source
1 min read
Two to four exclusive choices in one strip with a sliding thumb. Filters the current view in place.
1
using eQuantic.UI.Components;
DEFAULT
Medium · Stretch
Large
Usage
1
2
new SegmentedControl(["1M", "6M", "1Y"], _range,
i => SetState(() => _range = i))
API
Prop
Type
Default
Description
Segments
IReadOnlyList<string>
Two to four short labels. They must fit untruncated at 130 % type.
SelectedIndex
int
0
Exactly one segment is always selected.
OnChanged
Action<int>?
null
Selection handler.
Size
SizeVariant
Medium
Strip height from Sizing.
Stretch
bool
true
Segments share the width equally; false hugs each label.
Disabled
bool
false
0.38 across the strip.
States
State
Rendering
Selected
Surface thumb with elevation, TextPrimary
Unselected
TextSecondary on the subtle track
Pressed
The target label pre-tints immediately
Disabled
0.38
Accessibility
Announced as "1M, 1 of 3, selected"; arrows move the selection. One focus stop for the strip.
When to use
Filtering the view in front of you: time range, list scope.
Avoid
Page-level content switching — that is Tabs.
Labels that wrap or truncate.
NOTEEvery dimension resolves through Sizing.*(SizeVariant) and the token scales — never a literal. Source: src/eQuantic.UI.Components/SegmentedControl.cs.