search⌘K

Segmented Control

Last Updated: September 2026

Segmented controls let users choose one option from a short, joined set — ideal for view switchers and compact filters.

Anatomy

link
Dotted grid scale: 8px
  1. 1Root
  2. 2Button
  3. 3Pressed segment
  4. 4Track

Variants

link

Buttons

Text segments for labeled options.

Icon buttons

Icon-only segments for dense toolbars — aria-label is required.

Stretch

stretch fills the container; segments share width equally.

Disabled segment

Disable individual SegmentedControl.Button items.

Sizes

link

Segmented controls support 3 sizes: S, M, and L.

Line spacing scale: 8px
32px
36px
48px

Usage Guidelines

link

When to use

  • •For exclusive choices in a compact toolbar or filter row.
  • •When options are short and benefit from a joined segmented look.
  • •For view switchers (day/week/month) and similar mode toggles.

When not to use

  • •For independent on/off toggles — use Toggle Button or Switch.
  • •For long labels or many options — use Select.
  • •For primary page actions — use Button.
checkDo

Keep segment labels short and parallel (Day / Week / Month).

closeDon't

Don't put long sentences or wrapping prose in segment labels.

checkDo

Always set aria-label on IconButton segments.

closeDon't

Don't use segments for independent on/off settings — use Toggle Button.

Behaviors

link

Value model

  • •defaultValue and value are arrays of strings (e.g. defaultValue={["day"]}).
  • •Each Button / IconButton needs a unique value string.
  • •Uncontrolled: defaultValue; controlled: value + onValueChange from ToggleGroup.

Layout

  • •size: sm | md | lg — controls height, radius, and horizontal padding.
  • •stretch: true makes the root full width and grows each segment equally.
  • •Without stretch, the control is width-fit around its segments.

Parts

  • •SegmentedControl.Button for labeled segments.
  • •SegmentedControl.IconButton requires value, icon, and aria-label.
  • •disabled on a child skips that option without disabling the whole group.

Content Guidelines

link

Labels

  • •Use short nouns or view names users already know (Day, List, Grid).
  • •Match casing across segments — Title Case or sentence case, not mixed.

Values

  • •Use stable slug values ("day", "list"), not display labels.
  • •Keep demo values synthetic — no site names or patient identifiers.

Accessibility

link

Text & Labels

  • •Text buttons get their accessible name from children.
  • •IconButton requires aria-label — icons alone are not enough.

ARIA attributes

  • •Built on Base UI ToggleGroup + Toggle.
  • •Pressed segments expose pressed state; disabled segments are not selectable.

Keyboard Support

  • •Tab → move focus into the group / between focusable segments.
  • •Enter / Space → press the focused segment.
  • •Arrow keys may move focus between toggles depending on Base UI group behavior.

WCAG Compliance Standards

FAQs

link

Why is defaultValue an array?

SegmentedControl wraps Base UI ToggleGroup, which models selection as string[]. For exclusive mode pass a single-item array such as defaultValue={["day"]}.

Button vs IconButton?

Use Button for visible text labels. Use IconButton when space is tight — it requires icon, value, and aria-label.

SegmentedControl vs Tab Menu?

SegmentedControl switches modes/filters in place. Tab Menu navigates between destinations or major content panes.

link