Skip to content
Site volume
Colourway

Components

SegmentedControl

A native radio group drawn as two to five equal segments that change at once, with no sliding pill.

Import from@maxgrits/overprint-react/segmented-control
On this page

Example#

Look of this example
Live render of examples/segmented-control/basic.tsx

Usage#

Use a segmented control to switch between two to five views or modes of the same thing: grid or list, monthly or yearly, Bone or Night. It is a native radio group, so it works inside a form without JavaScript.

  • Changes at once. The selected segment takes the selected face and an inner ink ring at once, with no sliding pill, so chrome stays calm (D-H1).
  • More than five options, or long labels, belong in a Select or a RadioGroup.
  • Answering a question in a form is a RadioGroup; a segmented control switches what you are looking at.
  • Sizes. md 44 px (default) and sm 36 px, still 44 px on touch screens. Each option may carry a glyph.

Anatomy#

The parts of examples/segmented-control/basic.tsx, numbered:
  1. GroupA 2 px ink rule around equal segments..mk-segmented-control
  2. SegmentA native radio; selected takes the face and an inner ring..mk-segmented-control-segment
  3. LabelControl role, one or two words..mk-segmented-control-label

Volume#

Reading layer: identical at every volume.

  • Quiet

    Docs, forms, legal and long reads. Flat inks, no art in motion.

  • Studio

    The site default. Art on its own plates, one display moment per view.

  • Press

    Hero moments, covers and campaigns. Halftone fields and the second ink.

  • Rave

    Launches, posters and the 404. Every ink, and the words still win.

Content#

  • One or two words per segment, parallel in form: "Grid" and "List", "Monthly" and "Yearly".
  • The group's name says what it switches: "View", "Billing".
  • Never mix a setting and an action in one control.

Do and don't#

Do

Two views of the same prices.

Don't

Views, a contact action and a page, mixed.

Every segment should be a view of the same content. An action or a destination hidden among the views reads as a view and surprises people when it is not.

Accessibility#

  • Native radios: it works without JavaScript inside a form; arrows move and select.
  • The selected segment takes the selected face and an inner ink ring.
KeysWhat happens
TabMoves into the group, onto the selected segment
Arrow keysSelect the next or previous segment

The colour pairs it prints, with their contrast on both papers:

TextSurfaceRoleBoneNight
--mk-ink--mk-paper-hoverbody-ui 17.99:1 · Lc 103.4, passes 16.94:1 · Lc 96.5, passes
--mk-ink--mk-paper-sunken-hoverbody-ui 16.63:1 · Lc 98.0, passes 16.46:1 · Lc 96.3, passes
--mk-ink--mk-paper-plate-hoverbody-ui 16.90:1 · Lc 99.1, passes 16.02:1 · Lc 96.0, passes

Process at Studio, normal contrast. Every look: the press check.

Props#

PropTypeDefaultDescription
name requiredstringnoneThe radio group name (required: it posts with the form).
label requiredstringnoneThe group's accessible name (visible text elsewhere can name it through `aria-labelledby`).
options requiredreadonly SegmentedOption[]none
valuestringnone
defaultValuestringnone
onValueChange((value: string) => void)none
size"md" | "sm"none44 px (`md`) or 36 px (`sm`, still ≥ 44 under coarse pointers).
disabledbooleannone
aria-labelledbystringnone
classNamestringnone
styleCSSPropertiesnone
idstringnone

Generated from SegmentedControlProps in packages/overprint-react/src/reading/segmented-control/segmented-control.tsx.

Tokens#

Changelog#

Arrived in 0.1.0.

0.1.024 October 2026

  • MinorreactThe reading layer's controls, overlays, forms and visitor prefs (P2-T1 to P2-T5): every Button is the comic hit key, with IconButton, Link and Tooltip; Input, Textarea, Select, Checkbox and CheckboxGroup, Radio and RadioGroup, Switch, Slider with the ruler, RulerReadout and SegmentedControl; Dialog, Drawer, NavSheet, Tabs, Disclosure, Faq and faqJsonLd on Base UI 1.9 where the platform falls short; Field, Fieldset, Form with the site's inline validation, ErrorSummary, Callout, Honeypot, FormTimestamp and QuoteForm; PrefsScript under 1 KB, usePref and setPref with cross-tab sync, ThemeToggle and the visitor VolumeDial; VisuallyHidden.
  • PatchreactSegmentedControl, Tabs and CodeBlock draw LC-05's ring outside the focused key (2 px at 2 px) instead of inset; RadioGroup and CheckboxGroup keys and cards, VolumeDial stops and link Cards mark the element that draws the ring (data-mk-focus-ring); a focusable VisuallyHidden draws the ring. Read the whole entry