Tabs
Color
Line tabs
Type | Element | Property | Color token |
---|---|---|---|
Unselected | Tab | background-color | transparent |
border-bottom | $border-subtle * | ||
Label | text-color | $text-secondary | |
Icon | svg | $icon-secondary | |
Selected | Label | text-color | $text-primary |
Icon | svg | $icon-primary | |
Tab | border-bottom | $border-interactive |
![Example of selected and unselected line tabs Example of selected and unselected line tabs](/static/bb92e1c143d26a3cab0cec5cbac2a8ca/3cbba/tab-style-1.png)
Example of selected and unselected line tabs.
Interactive states
State | Element | Property | Color token |
---|---|---|---|
Hover | Label | text-color | $text-primary |
Icon | svg | $icon-primary | |
Tab | border-bottom | $border-strong | |
Focus | Tab: unselected | border | $focus |
Tab: selected | border | $focus | |
Disabled | Label | text-color | $text-disabled |
Icon | svg | $icon-disabled | |
Tab | background-color | transparent | |
border-bottom | $border-disabled |
![Examples of hover, focus-unselected, focus-selected, and disabled states Examples of hover, focus-unselected, focus-selected, and disabled states](/static/eed4b3cb4f5a52b694bf2d7952863c04/3cbba/tab-style-3.png)
Examples of hover, focus-unselected, focus-selected, and disabled states for line tabs.
Scrollable states
State | Element | Property | Color token |
---|---|---|---|
Enabled | Icon | svg | $icon-primary |
Button | linear-gradient | $background to 100% transparent, 8px | |
background-color | $background | ||
Hover | Button | background-color | $background-hover |
Active | Button | background-color | $background-active |
Focus | Button | border | $focus |
![Examples of enabled, hover, active, and disabled states for scrollable line tabs Examples of enabled, hover, active, and disabled states for scrollable line tabs](/static/6da910e9b9011953c4e14a6287e28d9b/3cbba/tab-style-4.png)
Examples of enabled, hover, active, and disabled states for scrollable line tabs.
Contained tabs
Type | Element | Property | Color token |
---|---|---|---|
Unselected | Tab | background-color | $layer-accent * |
border-right | $border-strong * | ||
Label | text-color | $text-secondary | |
Icon | svg | $icon-secondary | |
Selected | Tab | background-color | $layer * |
border-top | $border-interactive | ||
Label | text-color | $text-primary | |
Icon | svg | $icon-primary |
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Examples of selected and unselected contained tabs Examples of selected and unselected contained tabs](/static/16c8a987d2fbf5c48fb31adebeeb3bc9/3cbba/tab-style-2.png)
Examples of selected and unselected contained tabs.
Interactive states
State | Element | Property | Color token |
---|---|---|---|
Hover | Tab | background-color | $layer-accent-hover * |
Label | text-color | $text-primary | |
Icon | svg | $icon-primary | |
Focus | Tab | border | $focus |
Disabled | Label | text-color | $text-disabled |
Icon | svg | $icon-disabled | |
Tab | background-color | $button-disabled | |
border-right | $border-disabled |
* Denotes a contextual color token that will change values based on the layer it is placed on.
![Hover, focus-enabled, focus-selected, and disabled states for contained
tabs. Hover, focus-enabled, focus-selected, and disabled states for contained
tabs.](/static/179325a9c8e2c5f43b897e45f1d04c34/3cbba/tab-style-5.png)
Hover, focus-enabled, focus-selected, and disabled states for contained tabs.
Scrollable states
State | Element | Property | Color token |
---|---|---|---|
Enabled | Icon | svg | $icon-secondary |
Button | background-color | $layer-accent * | |
Hover | Button | background-color | $layer-accent-hover * |
Icon | svg | $icon-primary | |
Active | Button | background-color | $layer-accent-active * |
Focus | Button | border | $focus |
![Enabled, hover, active, and focus states for contained scrollable tabs. Enabled, hover, active, and focus states for contained scrollable tabs.](/static/098947e0d24ec5e67d02d38cfeebcfc9/3cbba/tab-style-6.png)
Examples of enabled, hover, active, and focus states for contained scrollable tabs.
Typography
Tab labels should be set in sentence case, and should not exceed three words.
Element | Font-size (px/rem) | Font-weight | Type token |
---|---|---|---|
Label: unselected | 14 / 0.875 | Regular / 400 | $body-compact-01 |
Label: selected | 14 / 0.875 | SemiBold / 600 | $heading-compact-01 |
Structure
Line tabs
Element | Property | px / rem | Spacing token |
---|---|---|---|
Tab | height | 40 / 2.5 | – |
border-bottom | 2px | – | |
width | auto-width | – | |
margin-left | 1px | – | |
Label | padding-left, padding-right | 16 / 1 | $spacing-05 |
padding-top, padding-bottom | 8 / 0.5 | $spacing-03 | |
Icon | padding-right | 16 / 1 | $spacing-05 |
padding-left | 8 / 0.5 | $spacing-03 | |
svg | 16 x 16 | – | |
Scrollable icon | svg | 16 x 16 | – |
![Structure and spacing measurements for line tabs. Structure and spacing measurements for line tabs.](/static/a115acb5ae4a94f524f65d60776c64cc/3cbba/tab-style-7.png)
Structure and spacing measurements for line tabs | px / rem
Icon-only modifier
Element | Property | px / rem | Spacing token |
---|---|---|---|
Tab (md) | height, width | 40 / 2.5 | – |
svg | 16 x 16 | – | |
Tab (lg) | height, width | 48 / 3 | – |
svg | 20 x 20 | – |
![Structure and spacing measurements for line tabs in px and rem Structure and spacing measurements for line tabs in px and rem](/static/fec6b86f9571888c4067c529392e9895/3cbba/tab-style-7b.png)
Structure and spacing measurements for icon-only line tabs | px / rem
Contained tabs
Element | Property | px / rem | Spacing token |
---|---|---|---|
Tab | height | 40 / 2.5 | – |
border-top | 2px | – | |
width | auto-width, grid | – | |
Label | padding-left, padding-right | 16 / 1 | $spacing-05 |
Icon | padding-right | 16 / 1 | $spacing-05 |
padding-left | 16 / 1 | $spacing-05 | |
svg | 16 x 16 | – | |
Tab | border-right | 1px | – |
Scrollable icon | svg | 16 x 16 | – |
Scrollable button | border-right, border-left | 1px | – |
![Structure and spacing measurements for contained tabs in px and rem Structure and spacing measurements for contained tabs in px and rem](/static/ae4b1e19375352c9ddc1e38d658fe1a9/3cbba/tab-style-8.png)
Structure and spacing measurements for contained tabs | px / rem
Icon-only modifier
Element | Property | px / rem | Spacing token |
---|---|---|---|
Tab (lg) | height, width | 48 / 3 | – |
svg | 20 x 20 | – |
![Structure and spacing measurements for icon-only contained tabs in px and
rem Structure and spacing measurements for icon-only contained tabs in px and
rem](/static/de61ebb16ebb4b2e5974cecd63f80da6/3cbba/tab-style-8b.png)
Structure and spacing measurements for icon-only contained tabs | px / rem