Jump to a component
Core · Actions
SegmentedControl
SegmentedControl switches between two to four views of the same thing: series sections, Following / For you, reading direction.
Live, from @anicanon/sakuga 2.0.0
Sakuga for iOS and Android is coming
Its glass example is native on iOS and Android, so it doesn’t draw on the web.
iOS
Coming soon
SegmentedControl for iOS is in the roughs. The tokens it will read are the ones on this page, the same on every platform.
Android
Coming soon
SegmentedControl for Android is in the roughs. The tokens it will read are the ones on this page, the same on every platform.
- Use it for
- Switching between two to four views of the same thing (series sections, Following and For you), or a setting with two to four named values.
Guidelines
- 2–4 short options. More than four is a list, not a segment.
- fill on the page; glass when it floats over artwork or video (the shorts feed).
- With sound on, a new choice plays the choose sound, by press, key or slide; pressing the chosen segment is silent (README · Sound).
- The selected segment uses
segmented-item-active-bg, drawn as one indicator that slides to the new segment onmotion-base; each segment is a button witharia-pressed, inside a group named bylabel.
- With
onChange, slide from the selected pill: it moves to the segment under the pointer, and letting go chooses that segment. It steps from segment to segment, rather than following the pointer exactly, so the label inside it always reads. A press still picks a segment.
import { useState } from 'react';
import { SegmentedControl } from '@anicanon/sakuga/ui';
export default function SegmentedControlExample() {
const [value, setValue] = useState('Episodes');
const [value2, setValue2] = useState('For you');
return (
<>
<SegmentedControl
label="Series sections"
fullWidth
value={value}
onChange={setValue}
options={[
{ label: 'Episodes' },
{ label: 'Shorts' },
{ label: 'Cast' },
{ label: 'World' },
]}
/>
<img
src="/art/eba-cinema.webp"
alt=""
style={{
position: 'absolute',
inset: 0,
width: '100%',
height: '100%',
objectFit: 'cover',
}}
/>
<SegmentedControl
label="Feed"
variant="glass"
value={value2}
onChange={setValue2}
options={[{ label: 'Following' }, { label: 'For you' }]}
/>
</>
);
}PropsSegmentedControlProps
optionsrequired{ label: string; value?: string; }[]valuerequiredstringlabelrequiredstringonChange(value: string) => voidvariant'fill'fullWidthbooleanclassNamestringEach token reads a role, and the role lands on a value in each theme. Change the role and every component that reads it follows.
Colour
segmented-track-bgSegmentedControl: track.bg-fill-subtleshade-a06rgba(11,10,16,0.06)bg-fill-subtlewhite-a08rgba(255,255,255,0.08)segmented-item-fgSegmentedControl: idle segments.text-primaryneutral-925#0b0a10text-primaryneutral-0#ffffffsegmented-item-active-bgSegmentedControl: the selected segment.action-primaryneutral-925#0b0a10action-primaryneutral-0#ffffffsegmented-item-active-fgSegmentedControl: the selected segment name.text-inverseneutral-0#fffffftext-inverseneutral-925#0b0a10segmented-glass-bgSegmentedControl glass: track over artwork or video, in both themes.bg-glass-mediaglass-dark-a42rgba(28,28,34,0.42)bg-glass-mediaglass-dark-a42rgba(28,28,34,0.42)segmented-glass-borderSegmentedControl glass: track edge.border-glass-mediawhite-a16rgba(255,255,255,0.16)border-glass-mediawhite-a16rgba(255,255,255,0.16)segmented-glass-item-fgSegmentedControl glass: idle segments over artwork.text-on-medianeutral-0#fffffftext-on-medianeutral-0#ffffffsegmented-glass-active-bgSegmentedControl glass: selected segment over artwork.action-medianeutral-0#ffffffaction-medianeutral-0#ffffffsegmented-glass-active-fgSegmentedControl glass: selected segment name over artwork.text-on-action-medianeutral-925#0b0a10text-on-action-medianeutral-925#0b0a10Space and shape
segmented-heightsize-control-mdsegmented-paddinginset-xssegmented-radiusradius-fullsegmented-glass-blurblur-glasssegmented-glass-inset-ring-widthline-hairlinesegmented-button-padding-xinset-lgsegmented-button-radiusradius-fullsegmented-button-active-scalescale-press-smsegmented-glide-radiusradius-fullsegmented-forced-edge-widthline-hairlineType
segmented-font-familyfont-sanssegmented-button-fonttext-labelMotion
segmented-button-background-color-durationmotion-basesegmented-button-easingease-standardsegmented-button-durationmotion-fastsegmented-button-active-durationmotion-instantChecked automatically with axe-core 4.11.4 against WCAG 2.2 A and AA, on the live preview above, in light and dark, on 26 October 2026.
- Result
- No issues found, in light or in dark.
- By design
- Tab focuses each option; Enter or Space picks it. A screen reader hears the group's
label, then each option as a button, "pressed" when selected. Dragging the pill is for the pointer; Enter or Space on an option does the same. - Not tested
- The automated check doesn't test keyboard use, focus order or what a screen reader says. The lines above are the design system's own account of them.