SegmentedPivot recipe
Source: 04_SegmentedPivot/ · Pivot's compact cousin, styled as a segmented control.
It has the same API as Pivot, but reads as "pick exactly one" — so reach for it when the choices are mutually-exclusive filters or short toggles.
When to use which
Use Pivot when… |
Use SegmentedPivot when… |
|---|---|
| Tabs are page sections (Overview / Settings). | Tabs are filters or toggles (All / Open / Closed). |
| Labels are long or vary in length. | Labels are short and roughly the same length. |
| You may have many tabs (overflow matters). | You have 2–5 tightly related options. |
| Tabs each render a substantial view. | Tabs render the same kind of thing, filtered. |
Code sketch
SegmentedPivot()
.Item("All", () => BuildList(filter: null))
.Item("Open", () => BuildList(filter: Status.Open))
.Item("Closed", () => BuildList(filter: Status.Closed))
See also
- Pivot recipe — the full tab-strip story.
Tesserae.Tests/src/Samples/Surfaces/SegmentedPivotSample.cs.