Tabs
The Tabs component provides a reusable pattern for tabs in the interface.
Tabs
A basic tabs component with three panels. The first tab is open by default; clicking another tab reveals its content.
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Explicabo autem nihil veritatis natus, nemo numquam aut veniam, accusamus sapiente illum voluptates porro ad laborum repellendus dolore maiores distinctio obcaecati mollitia.
Tabs with HTML content
Tab content supports raw HTML markup, allowing rich content such as headings, lists, and links inside each panel.
About us
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit architecto corrupti in assumenda nulla.
- First point
- Second point
- Third point
Many tabs
When the number of tabs exceeds the available container width, the tab header scrolls horizontally to reveal hidden tabs.
Lorem ipsum dolor sit amet consectetur adipisicing elit.
API
| Parameter | Default | Description |
|---|---|---|
|
id
|
ID for the component | |
|
componentElement
|
div | The tag for the component |
|
tabs
|
[] | List containing tabs with tab title and content. |
|
headingElement
|
button | - |
|
contentElement
|
div | - |
CSS API
| Variable | Default | Type | Values | Description |
|---|---|---|---|---|
|
--c-tabs--base
|
var(--base) | range | - | Main unit that drives radius and spacing scales. |
|
--c-tabs--border-width
|
var(--border-width) | range | - | Size |
|
--c-tabs--color--primary
|
var(--color--primary) | color | - | Primary |
|
--c-tabs--color--surface-border
|
var(--color--surface-border) | color | - | Manual companion token for borders on surface elements. |
|
--c-tabs--color--surface-contrast-muted
|
var(--color--surface-contrast-muted) | color | - | Derived muted contrast for text and icons on surface backgrounds. |