Structure

A component that lets users select between a group of 2-6 options (segments), all stored in one container.

It should generally be used at the top level of navigation in a page and have a single selectable option.

segmented control structure

PropertyTokenPixelRem
Border radius - segmentradii-212px0.75
Border radius - containerradii-316px1
PropertyPixel
Border-width (inside) - Focus2px

Size

The size of the segment’s padding and typography will vary with each of the size variants of the component.

For the md and lg size variants of the segment, the padding sizes and behaviour will be identical. As these would be primarily used for bigger breakpoints, each segment in the group should have the same size, inheriting the size of the biggest segment when the content size within is different.

For the sm variant, we want each segment to wrap around the content, given the minimum padding shown, even if that means some segments would be bigger than others. This is to save space and fit as much as possible on mobile breakpoints, where this would be primarily used.

The padding of the container around the segment group will remain the same across all size variants.

segmented control size

SegmentTokenPixelRem
Padding-horizontal smspace-416px1
Padding-vertical smspace-2424px1.5
Padding-horizontal md, lgspace-532px2
Padding-vertical md, lgspace-2424px1.5
Title margin-bottom smspace-312px0.75
Title margin-bottom md, lgspace-416px1
ContainerTokenPixelRem
Padding-horizontalspace-14px0.25
Padding-verticalspace-14px0.25

Segment with an icon

segmented control with icon

SegmentTokenPixelRem
Icon margin-bottom smspace-312px0.75
Icon margin-bottom md, lgspace-416px1
Icon size smsm16px-
Icon size md, lgmd24px-

Typography

segmented control typography

Property - elementFamilyWeightSizeRempx
Font - title sm$body600$sm0.87514
Font - description sm$body400$xs0.7512
Font - title md$body600$md116
Font - description md$body400$sm0.87514
Font - title lg$body600$lg1.312521
Font - description lg$body400$md116

Colour

The segmented control uses a set of high-contrast neutral colours for the selected segment and darker lower-contrast colours for the unselected segments and container. This is with the goal of focusing the user’s attention on the selected option.

The unselected segments and container should match the background colour of the page where the component is used. This is to allow for a consistent look within both Atom and Quest, as well as use with different-coloured themes in Atom Home.

segmented control colours

Property, element & stateTokenHex
Bg colour - Selected default$white#ffffff
Bg colour - Unselected default$primary200#e5f1ff
Bg colour - Unselected hover$primary300#d6eaff
Bg colour - Unselected pressed$primary100#f2f8ff
Bg colour - Container$primary200#e5f1ff
Border-colour - Focus$primary#0F67F5
Font-color - Title, all states$color-text-bold#545454
Font-color - Description, all states$color-text-subtle#0F67F5
StateValue
Disabled: all elements30% opacity