Tabs
On this page
On this page
Overview
Tabs are used to organize and navigate between sections of content. They feature a horizontal or a vertical list of section text labels with a content panel below or to the right of the component.
Edit element properties
import '@rhds/elements/rh-tabs/rh-tabs.js';
a {
color: var(--rh-color-interactive-primary-default);
&:hover {
color: var(--rh-color-interactive-primary-hover);
}
&:focus-within {
color: var(--rh-color-interactive-primary-focus);
}
&:active {
color: var(--rh-color-interactive-primary-active);
}
&:visited {
color: var(--rh-color-interactive-primary-visited);
&:hover {
color: var(--rh-color-interactive-primary-visited-hover);
}
&:focus-within {
color: var(--rh-color-interactive-primary-visited-focus);
}
&:active {
color: var(--rh-color-interactive-primary-visited-active);
}
}
}
<rh-tabs>
<rh-tab id="users" slot="tab" active="">Users</rh-tab>
<rh-tab-panel>Users</rh-tab-panel>
<rh-tab slot="tab">Containers</rh-tab>
<rh-tab-panel>Containers <a href="#">Focusable element</a></rh-tab-panel>
<rh-tab slot="tab">Database</rh-tab>
<rh-tab-panel>Database</rh-tab-panel>
<rh-tab slot="tab">Servers</rh-tab>
<rh-tab-panel>Servers</rh-tab-panel>
<rh-tab slot="tab">Cloud</rh-tab>
<rh-tab-panel>Cloud</rh-tab-panel>
</rh-tabs>
Label for the scroll left button
Label for the scroll right button
Index of the active tab
Sets color context for child components, overrides parent context
Aligns tabs to the center
Sets tabs to a boxed style with or without an inset
Sets the alignment of the tabs vertical
Status
What do these mean?
- Figma library:
-
Ready - RH Elements:
-
Ready - RH Shared Libs:
-
Ready
When to use
- When you need to group related information into different categories
- When users need to read sections of content in the same view without leaving the page
- When you need to group other types of content in the same view like forms, settings, dashboards, etc.
Image of open tabs, box tabs, and tabs with overflow buttons
Status checklist
Property | Status | Meaning |
---|---|---|
Figma library |
|
Component is available in the Figma library |
RH Elements |
|
Component is available in the RH Elements repo |
RH Shared Libs |
|
Component is available in the RH Shared Libs repo |
Other libraries
To learn more about our other libraries, visit this page.
Feedback
To give feedback about anything on this page, contact us.