Skip to main content

Tabs

UI Design

What are Tabs

Tabs are a UI control that splits content into sections and shows one section at a time. Users click a tab label to switch the panel below it. Tabs come from the metaphor of folder tabs in a filing cabinet.

Anatomy of Tabs

  • Tab list: A row of short labels
  • Selected indicator: A line, fill or color that marks the active tab
  • Panel: The content of the selected tab

Types of Tabs

  • In-page tabs: Switch content inside the same page, such as Overview and Reviews
  • Navigation tabs: Look like tabs but load different pages

When to use Tabs

Use tabs for parallel content that users view one part at a time. Keep labels short and the selected tab obvious. Do not use tabs when users need to compare sections side by side, because tabs hide all but one panel. Support keyboard use with arrow keys between tabs.

Frequently asked questions

When should you use tabs instead of an accordion?

Use tabs when users need one section at a time and the sections are parallel, such as Overview, Reviews and Specs. Use an accordion when users may want several sections open, or on narrow screens with long section titles.

What is the difference between in-page tabs and navigation tabs?

In-page tabs swap the content of a panel on the same page. Navigation tabs look similar but load a different page. Both need a clear marker for the selected tab.

Are tabs accessible with a keyboard?

They can be. The W3C tabs pattern lets users Tab into the tab list and use arrow keys to move between tabs, with each tab linked to its panel for screen readers.