Usage
Use tabs when you want to organize information into highly scannable display for users.
You can use as many tabs as you want in a page, although it is recommended you keep the total number of tabs to a minimum for a better user experience. If you have more tabs than fit on the page, you may use a default overflow which would allow a user to horizontally scroll through your tabs. The uses of both default and boxed stylings are flexible, so use either according to your needs and preferences.
Variations
- Default tabs (recommended)
- Boxed tabs
- Vertical tabs
- Disabled tabs
- Primary tabs
- Secondary tabs
- Horizontal overflow
Default tabs
Default tabs do not have any borders, other than the bottom line to distinguish between a selected tab, a hovered over tab, and a non-active tab. They can be formatted as standard or filled. Filled tabs stretch to fit the width of the container that they are placed in.
Is it recommended to use these tabs over other tab types in most cases - specifically for top page header tabs or tabs nested within components.
![Default tabs ex](/images/default-tabs.f2597e4b28ee63b9.png)
Boxed tabs
Box tabs are functionally the same as default tabs, but they are outlined by a box to emphasize the area that the tab spans. Boxed tabs can be used in screens with narrower widths, such as a drawer within a primary detail view.
![Standard and filled tabs ex](/images/default-vs-filled-tabs.73c8226209fd37c6.png)
Vertical tabs
Vertical tabs are placed on the left hand side of a page or container.
![Vertical tabs ex](/images/vertical-tabs.55ed0a07f9a20645.png)
Disabled tabs
PatternFly supports a disabled tab variation for all tab types. A disabled tab can be used to indicate that a section is unavailable to the user, usually due to a lack of permissions. Information to explain why the tab is disabled may be provided by using a tooltip on the element.
![Example of disabled tab with tooltip](/images/disabled-tab.cff0ed32e4d3d075.png)
Horizontal overflow
Horizontal overflow menus are useful when there is not enough space on a screen to display all tabs. The overflow menu contains all the remaining tabs and is always placed as the last tab on the right. Selecting options from overflow menu changes the name of the main tab to the selected one. You may show an overflowing tab count next to the overflow menu name, if needed.
![Horizontal overflow interaction](/images/Horizontal-overflow.1f1735995c1c6683.png)
Hierarchy
When designing tab organization with two levels of tabs, it's important to create a clear hierarchy. To achieve this, the top level tabs should use the default open tabs, which feature a 16pt font. Meanwhile, the bottom level tabs should use the secondary open tabs, which feature a 14pt font.
Primary tabs
Use primary tabs only for top page header tabs and vertical tabs. Primary tabs use 16px text.
![Primary tabs ex](/images/primary-tabs.c2eaa380e2ebd092.png)
Secondary tabs
Use secondary tabs to help differentiate between two levels of tabs and make it easier for users to navigate through the interface.
![Secondary tabs ex](/images/secondary-1-tabs.bd09f2c3e11a6709.png)
- Primary tabs
- Secondary tabs
Secondary tabs should also be used when tabs live within a component, or are in a non-full page context, like in a modal.
![Secondary tabs ex](/images/secondary-2-tabs.70cd6221db8f0bc4.png)