Components
Segmented Control
Segmented controls let the user choose one option from a small set of mutually exclusive choices, presented inline.
Stable
GitHubAnatomy
Anatomy
import {SegmentedControl} from '@staffbase/design';
<SegmentedControl.Root>
<SegmentedControl.Item />
</SegmentedControl.Root>;Examples
With icons
Variants
API reference
Root
Inherits props fromBase UI Radio Group
| Name | Type | Description |
|---|---|---|
aria-label | string | Accessible label for the segmented control |
variant | studiocontent | Default variant styles are designed for use in studio header. When using Segmented Control in the content area, use the content variant. Default: studio |
Item
Inherits props fromBase UI Radio Root
When to use
When not to use
How to use
Structure
Variants
Icon & label
Badge
Layout & spacing
Do
Up to five segments with balanced label lengths.
Don't
Seven segments crowd the control and reduce scannability.
Accessibility
Content & UX copy
Do
One-word labels of the same kind and length.
Don't
Mixing label styles and lengths in one group.