Tabs

Tabs allow users to navigate between views within the same page or context.

Examples

Default

Default tabs example

Default tabs usage

Class
Applied to
Outcome
.pf-m-disabled
a.pf-v6-c-tabs__link
Modifies a tabs link for disabled styles.
.pf-m-aria-disabled
.pf-v6-c-tabs__link
Modifies a tabs link for disabled styles, but is still hoverable/focusable.

Overflow

Overflow beginning of list example

Overflow beginning of list usage

Class
Applied to
Outcome
.pf-m-scrollable
.pf-v6-c-tabs
Enables the directional scroll buttons.
.pf-v6-c-tabs__scroll-button
<div>
Initiates a tabs component scroll button container.

Horizontal overflow example

Horizontal overflow expanded example

Horizontal overflow selected example

Vertical

Vertical tabs example

Vertical expandable example

Vertical expanded example

Vertical expandable responsive example

Vertical expandable example (deprecated)

Containers

Vertical expanded example (deprecated)

Containers

Vertical expandable responsive example (deprecated)

Containers

Box

Box tabs example

Box overflow example

Box vertical example

Box tabs secondary variant example

Tab insets

Default tab insets example

Box tab insets example

Page insets example

Insets usage

Class
Applied to
Outcome
.pf-m-inset-{none, sm, md, lg, xl, 2xl, 3xl}{-on-[sm, md, lg, xl, 2xl]}
.pf-v6-c-tabs
Modifies the tabs component padding/inset to visually match padding of other adjacent components.
.pf-m-page-insets
.pf-v6-c-tabs
Modifies the tabs component padding/inset to visually match padding of page elements.

Icons

Icons and text example

Sub tabs

Tabs with sub tabs example

Box tabs with sub tabs example

Filled

Filled tabs example

Filled with icons example

Filled box example

Filled box with icons example

Filled usage

Class
Applied to
Outcome
.pf-m-fill
.pf-v6-c-tabs
Modifies the tabs to fill the available space. Required

Tabs as navigation

Tab item actions

Help button example











Close button example











Help and close button example











Add tab button

Add tab button example





Documentation

Overview

The tabs component should only be used to change content views within a page. The similar-looking but semantically different horizontal nav component is available for general navigation use cases.

Tabs should be used with the tab content component.

Whenever a list of tabs is unique on the current page, it can be used in a <nav> element. Cases where the same set of tabs are duplicated in multiple regions on a page (e.g. cards on a dashboard) are less likely to benefit from using the <nav> element.

Usage

Class
Applied to
Outcome
.pf-v6-c-tabs
<nav>, <div>
Initiates the tabs component. Required
.pf-v6-c-tabs__list
<ul>
Initiates a tabs component list. Required
.pf-v6-c-tabs__item
<li>
Initiates a tabs component item. Required
.pf-v6-c-tabs__item-text
<span>
Initiates a tabs component item icon. Required
.pf-v6-c-tabs__item-icon
<span>
Initiates a tabs component item text. Required
.pf-v6-c-tabs__item-close
<span>
Initiates a tabs component item close.
.pf-v6-c-tabs__item-close-icon
<span>
Initiates a tabs component item close icon.
.pf-v6-c-tabs__link
<button>, <a>
Initiates a tabs component link. Required
.pf-v6-c-tabs__scroll-button
<div>
Initiates a tabs component scroll button container.
.pf-v6-c-tabs__add
<span>
Initiates a tabs component add button.
.pf-v6-c-tabs__toggle
<div>
Initiates a tabs expandable toggle.
.pf-v6-c-tabs__toggle-button
<button>
Initiates a tabs expandable toggle button.
.pf-v6-c-tabs__toggle-icon
<span>
Initiates a tabs expandable toggle icon.
.pf-v6-c-tabs__toggle-text
<span>
Initiates a tabs expandable toggle text.
.pf-m-tubtab
.pf-v6-c-tabs
Applies subtab styling to the tab component.
.pf-m-no-border-bottom
.pf-v6-c-tabs
Removes bottom border from a tab component.
.pf-m-box
.pf-v6-c-tabs
Applies box styling to the tab component.
.pf-m-vertical
.pf-v6-c-tabs
Applies vertical styling to the tab component.
.pf-m-fill
.pf-v6-c-tabs
Modifies the tabs to fill the available space.
.pf-m-current
.pf-v6-c-tabs__item
Indicates that a tab item is currently selected.
.pf-m-action
.pf-v6-c-tabs__item
Indicates that a tab item contains actions other than the tab link.
.pf-m-overflow
.pf-v6-c-tabs__item
Applies overflow menu styling to a tab item.
.pf-m-expanded
.pf-v6-c-tabs__item
Applies expanded styling to the overflow menu tab item.
.pf-m-inset-{none, sm, md, lg, xl, 2xl}{-on-[md, lg, xl, 2xl]}
.pf-v6-c-tabs
Modifies tabs horizontal padding at optional breakpoint.
.pf-m-page-insets
.pf-v6-c-tabs
Modifies the tabs component padding/inset to visually match padding of page elements.
.pf-m-secondary
.pf-v6-c-tabs.pf-m-box
Modifies the tabs component tab background colors for the box variant.
.pf-m-expandable{-on-[breakpoint]}
.pf-v6-c-tabs
Modifies the tabs component to be expandable via a toggle at optional breakpoint. Note: works with vertical tabs only.
.pf-m-non-expandable{-on-[breakpoint]}
.pf-v6-c-tabs
Modifies the tabs component to be non-expandable at optional breakpoint.
.pf-m-expanded
.pf-v6-c-tabs
Modifies the expandable tabs component for the expanded state.
.pf-m-disabled
a.pf-v6-c-tabs__link
Modifies a tabs link for disabled styles.
.pf-m-aria-disabled
.pf-v6-c-tabs__link
Modifies a tabs link for disabled styles, but is still hoverable/focusable.

CSS variables

Expand or collapse columnSelectorVariableValue
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--inset
0
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--Width
auto
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--before--BorderColor
(In light theme) #c7c7c7
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--before--border-width--base
1px
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--before--BorderBlockStartWidth
0
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--before--BorderInlineEndWidth
0
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--before--BorderBlockEndWidth
1px
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--before--BorderInlineStartWidth
0
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical--inset
0.5rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-page-insets--inset
1rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical--Width
100%
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical--MaxWidth
15.625rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical--m-box--inset
1rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical__list--before--BorderColor
(In light theme) #c7c7c7
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical__list--before--BorderBlockStartWidth
0
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical__list--before--BorderInlineEndWidth
0
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical__list--before--BorderBlockEndWidth
0
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical__list--before--BorderInlineStartWidth
1px
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__list--Display
flex
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--BackgroundColor
transparent
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--PaddingBlockStart
0.5rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--PaddingBlockEnd
0.5rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--PaddingInlineStart
0.5rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--PaddingInlineEnd
0.5rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--ColumnGap
0.25rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical__item--PaddingInlineStart
1rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-vertical__item--PaddingInlineEnd
1rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--m-current--BackgroundColor
transparent
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-box__item--BackgroundColor
(In light theme) #f2f2f2
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-box__item--m-current--BackgroundColor
(In light theme) #fff
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-box--m-secondary__item--BackgroundColor
(In light theme) #fff
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs--m-box--m-secondary__item--m-current--BackgroundColor
(In light theme) #f2f2f2
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--m-action--before--ZIndex
200
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--Color
(In light theme) #4d4d4d
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--FontSize
0.875rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--BackgroundColor
(In light theme) rgba(255, 255, 255, 0.0000)
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--BorderRadius
6px
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--PaddingBlockStart
0.25rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--PaddingInlineEnd
0.5rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--PaddingBlockEnd
0.25rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--PaddingInlineStart
0.5rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--ColumnGap
0.5rem
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--disabled--Color
(In light theme) #4d4d4d
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--disabled--BackgroundColor
(In light theme) #c7c7c7
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__link--hover--BackgroundColor
(In light theme) rgba(199, 199, 199, 0.2500)
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--m-current__link--Color
(In light theme) #151515
:where(:root, .pf-v6-c-tabs)--pf-v6-c-tabs__item--m-current__link--BackgroundColor
(In light theme) rgba(255, 255, 255, 0.0000)