Structure

A component that lets users toggle between a group of 2-6 options. It can be set as single select or multiple select and displayed vertically or horizontally.

toggle group structure

PropertyTokenPixelRem
Border radiusradii-04px0.25
Border radius mergednone00

toggle group gap

PropertyTokenPixelRem
spacing sm (default)space $280.5
spacing mdspace $3120.75
spacing lgspace $4161
spacing xlspace $5322

toggle group states

Propertypixel
Border-width (inside) - Default, hover (default)1px
Border-width (inside) - Selected, hover (selected)2px
Focus shadow - Border (width 2px white gap)2px

Size

Change the size of the entire group button, including padding, font size and border with the size property.

Toggle group has the same height as a regular buttons (32px, 40px and 48px).

Within the group, all segments are equal in width, taking the width from the longest label used.

There’s an option that sets the button-group to fullwidth and every child to grow with same width to fill the available space of the parent container.

toggle group size

Propertyxssmmdlg
Height32px32px40px48px
min-width32px48px60px72px
Icon sizesm 16pxmd 16pxlg 24pxlg 24px
PropertyTokenPixelRem
Padding xsspace $312px0.75
Padding smspace $416px1
Padding mdspace $532px2
Padding lgspace $532px2
Icon margin-right smspace $28px0.5
Icon margin-right md, lgspace $312px0.75

Icon only

toggle icon only

PropertyTokenPixelRem
Padding xsspace $28px0.5
Padding smspace $28px0.5
Padding mdspace $28px0.5
Padding lgspace $312px0.75

Typography

toggle group typography

FontFamilyWeightSizeRemPx
lg$body600$lg1.312521
md$body600$md116
sm$body600$sm0.87514

Color

By default the segmented control has a height of 32px (the same as a button). You should however keep things on the 8px grid or in some cases the 4px grid. You should only need the following recommended heights.

toggle group color

Property, Element & StateTokenHex
Bg color$white#ffffff
Border-color - Default$grey600#
Border-color - Selected, Focus$blue800#
Border-color - Selected hover$blue900#
Font-color - Default, Default focus$grey800#
Font-color - Selected, Selected focus$blue800#
Font-color - Hover$blue900#

Dark color mode

For use on dark (grey-1000) surfaces with colorMode="dark". Both themes share these values:

Property, Element & StateTokenHex
Bg colornone—
Font-color - Default$grey200#ebebeb
Font-color - Selected, Hover$white#ffffff
Focus ring - Inner gap (2px)$grey1000#1f1f1f

The modern theme also sets:

Property, Element & StateTokenHex
Group bg color$grey800#545454
Bg color - Selected$grey900#333333
Border-color - Selected$grey800#545454

The standard theme keeps its grey600 borders and dividers; the selected border follows the white font colour.

StateValue
Disabled: all elements30% opacity