SegmentedControl
A segmented control lets users choose one option from a small set of mutually exclusive choices. The active segment is filled with the accent colour, and the control comes in two heights.
Base
Mantine + override
Mantine
Import
{ SegmentedControl } from '@mantine/core'
Source
src/themes/theme.ts
src/themes/style-overrides/segmented-control.module.css
Usage
size
md
lg
disabled
React
<SegmentedControl size="lg" data={['Dag', 'Uke', 'Måned']} defaultValue="Uke" />
Props
Only what this design system changes. Everything else is Mantine's — read the full props table there.
| Property | Type | Allowed values | Default | Description |
|---|---|---|---|---|
size | MantineSize | md · lg | lg | Sets the control height: 40px for md, 48px for lg. Any other value falls back to 48px. |
radius | MantineRadius | number | — | md | Rounds the corners. md is 8px. |
withItemsBorders | boolean | — | false | Draws a border between segments. Mantine ships it on; this theme turns it off. |
| — | — | — | — | Active segment: indicator filled with --mantine-color-accent, label in --mantine-color-button-text-inverted. Inactive segments: hover fills with --mantine-color-surface-greyer. The track uses --mantine-color-surface-grey. |
| — | — | — | — | Disabled: the active indicator drops to 50% opacity. Inactive labels take --mantine-color-disabled-color and lose their hover surface. |
Accessibility
SegmentedControl renders as a radio group (role="radiogroup" with one
radio input per segment) — give it an aria-label or a preceding visible
label naming the choice it controls, the same as any other radio group.
Keyboard navigation (arrow keys between segments) is Mantine's own. See
Accessibility for focus and contrast.