Tab list

Also known as: Page navigation, segmented control

Resources

Properties

PropertyValuesDefault
Size VariantSm | MdMd
Selected Booleantrue | falsefalse
State VariantDefault | Hover | Focus | DisabledDefault
Has start item Booleantrue | falsetrue
Start item InstanceSwapAny iconheart
Label TextstringLabel
Has end item Booleantrue | falsetrue
End item InstanceSwapAny iconheart

When to use

You need to switch between multiple content sections within the same page.
The content under each tab is related and should be easily comparable.

There are only two options, use a segmented control instead.
The content under each tab is independent and not meant for quick comparisons.

Size

Dimensions of the segmented control are tied to the global scale tokens. This ensures that the components, especially forms, with similar size settings remain consistent across the interface. scale tokens also provides more granular control over dimensional settings.

scale.css
--scale-height-<size>
--scale-width-<size>
--scale-padding-<size>
--scale-gap-<size>
--scale-radius-<size>
--scale-icon-size-<size>
--scale-text-size-<size>
--scale-text-height-<size>

Behaviour

States

Tab list (and all other forms and selection controls) express states. States indicate current condition of the component to someone interacting with it. Using states ensure clear user feedback, highlighting possible actions or barriers. We have included most common states:

StateContext
DefaultStatus of the component before the interaction. Also referred to as ‘resting’.
HoverWhen the user moves their cursor over the component, but is not taking the action. Slight visual change can indicate interactivity of the component.
FocusWhen user selects the component via keyboard navigation, but has not yet taken action on it.
DisabledA non-interactive state where the component appears faded or grayed out. It indicates that the action is unavailable at the moment.