Skip to content

Tabs

A React source recipe with Base UI behavior and the public TIS Tabs classes and tokens.

Design

Functional preview

Running with the React source recipe distributed through shadcn and based on Base UI.

Loading functional preview…

Anatomy

1

Panel content goes here.

4
1 Tab list (.ds-tabs) — container with role="tablist".
2 Tab (.ds-tab) — individual tab button with role="tab".
3 Active indicator — bottom border on the active tab.
4 Tab panel — content area with role="tabpanel".

Default tabs

One tab is active, the others are in their default state. Each tab controls a corresponding panel.

This is the Overview panel content. It provides a summary of your account status and recent activity.

With disabled tab

A disabled tab cannot be interacted with and is skipped during keyboard navigation.

General settings for your account: display name, language, and timezone preferences.

Multiple tabs

Tabs scroll horizontally when they overflow the container.

Dashboard panel showing project metrics, recent commits, and team activity overview.

Token mapping

PropertyTokenCSS variable
text (inactive)component.tabs.label.color.default--ds-tabs-label-color-default
text (hover)component.tabs.label.color.hover--ds-tabs-label-color-hover
text (active)component.tabs.label.color.active--ds-tabs-label-color-active
text (disabled)component.tabs.label.color.disabled--ds-tabs-label-color-disabled
active indicatorcomponent.tabs.indicator.fill.active--ds-tabs-indicator-fill-active
dividersemantic.overlay.default--ds-overlay-default
list bordercomponent.tabs.list.border-width.default--ds-tabs-list-border-width-default
item paddingcomponent.tabs.item.{padding-x,padding-top}.default--ds-tabs-item-padding-*-default
gap to indicatorcomponent.tabs.item.indicator-gap.default--ds-tabs-item-indicator-gap-default
indicator heightcomponent.tabs.indicator.height.default--ds-tabs-indicator-height-default
label typographycomponent.tabs.label.{font-size,line-height,font-weight,letter-spacing}.default--ds-tabs-label-*-default
panel paddingcomponent.tabs.panel.padding-y.default--ds-tabs-panel-padding-y-default
focus ringcomponent.focus-ring.{color.default,width}--ds-focus-ring-color-default, --ds-focus-ring-width
focus ring radiuscomponent.tabs.focus-ring.radius.default--ds-tabs-focus-ring-radius-default