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

Propertysmmdlg
Height32px40px48px
min-width48px60px72px
Icon sizemd 16pxlg 24pxlg 24px
PropertyTokenPixelRem
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 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#
StateValue
Disabled: all elements30% opacity