Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: Tabs
section: components
---

import '../components.css';

## Usage
Use tabs when you want to organize information into highly scannable display for users.

Expand All @@ -24,32 +26,42 @@ Default tabs do not have any borders, other than the bottom line to distinguish

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.

<img src="./img/default-tabs.png" alt="Default tabs ex" width="1500"/>
<div class="ws-docs-content-img">
![Example of default tabs.](./img/tabs-default.svg)
</div>


### 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.

<img src="./img/default-vs-filled-tabs.png" alt="Standard and filled tabs ex" width="1500"/>
<div class="ws-docs-content-img">
![Example of boxed tabs.](./img/tabs-boxed.svg)
</div>

### Vertical tabs

Vertical tabs are placed on the left hand side of a page or container.

<img src="./img/vertical-tabs.png" alt="Vertical tabs ex" width="1500"/>
<div class="ws-docs-content-img">
![Example of vertical tabs.](./img/tabs-vertical.svg)
</div>

### 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.

<img src="./img/disabled-tab.png" alt="Example of disabled tab with tooltip" width="986"/>
<div class="ws-docs-content-img">
![Example of a disable tab with a tooltip.](./img/tabs-disabled.svg)
</div>

### 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.

<img src="./img/Horizontal-overflow.png" alt="Horizontal overflow interaction" width="735"/>
<div class="ws-docs-content-img">
![Example of horizontal overflow.](./img/tabs-horizontal-overflow.svg)
</div>

### Hierarchy

Expand All @@ -59,19 +71,22 @@ When designing tab organization with two levels of tabs, it's important to creat

Use primary tabs only for top page header tabs and vertical tabs. Primary tabs use 16px text.

<img src="./img/primary-tabs.png" alt="Primary tabs ex" width="1500"/>
<div class="ws-docs-content-img">
![Example of primary tabs.](./img/tabs-primary.svg)
</div>

### Secondary tabs

Use secondary tabs to help differentiate between two levels of tabs and make it easier for users to navigate through the interface.

<img src="./img/secondary-1-tabs.png" alt="Secondary tabs ex" width="1500"/>

1. Primary tabs
2. Secondary tabs
<div class="ws-docs-content-img">
![Example of primary and secondary tabs.](./img/tabs-secondary.svg)
</div>

Secondary tabs should also be used when tabs live within a component, or are in a non-full page context, like in a modal.

<img src="./img/secondary-2-tabs.png" alt="Secondary tabs ex" width="1500"/>
<div class="ws-docs-content-img">
![Example of secondary tabs used in a modal.](./img/tabs-modal.svg)
</div>