Tabs
Tabs let people switch between views of the same content, one view at a time.
Overview
Use tabs when a screen has a few related views and people only need to see one at a time. Tapping a tab shows its content right away.

Types
Underline

Plain text tabs with a line under the selected one.
When to use: to switch between the main views of a page or a section. It is quiet and takes little space.
When not to use: when you need to show a count in the tab. Use pill.
Pill

Tabs inside a rounded outline.
When to use: to switch between filters or views inside a smaller area, like a card or a list. Also when tabs need to show a count.
When not to use: when you want the lightest look possible. Use underline.
Anatomy
Underline tab

Label: the name of the tab.
Underline: a line under the label. It shows only on the selected tab.
Pill tab

Container: the rounded outline.
Label: the name of the tab.
Count (optional): a number that shows how many items are in the tab, like (12).
Tabs, radio, or navigation?
Component | Use it to | The change happens |
|---|---|---|
Tabs | Switch between views of the same content | Right away |
Radio | Choose one value in a form | When the form is submitted |
Navigation | Go to a different page or section | When people move to a new page |
Do and Don't
Do

Use tabs for a few related views, like All, Active, and Archived.
Dont

Use tabs for long lists of unrelated actions, like Settings, Delete Account, and Export Data.
Do

Keep tab labels short and clear, so people can tell the tabs apart.
Dont

Use tabs for long lists of unrelated actions, like Settings, Delete Account, and Export Data.
Do

Use 2 to 5 pill tabs, like Day, Week, and Month.
Dont

Add 8 or more pills until they overflow the screen. More options should move to a dropdown or a different pattern.
Do

Place the content that the tabs switch directly below them.
Dont

Place the content above the tabs. People read top to bottom, so the tabs should come first and the content they control follows.
Do

Cap big values, like 99+ on the counter
Dont

Show full numbers like 12480. Long numbers stretch one pill and push the others around.
Sizes
The underline tab has one size. The pill tab comes in small and medium.
Small
When to use: tight spaces, like inside a card.
When not to use: when the tabs are the main way to switch views on the screen.
Medium
When to use: when the tabs need more presence.
When not to use: in tight spaces.
Count
Only the pill tab can show a count.
The count is a number only. It isn't tappable.
It is hidden when no count is given.
A count of zero is shown as 0.
Counts above 99 show as 99+.
Screen readers read the count together with the label, like Inbox, 3.
States


Default
The tab is ready to use.
Hover
The pointer is over the tab. This is shown on web only.
Focus
A ring appears around the tab when someone reaches it with a keyboard. This is shown on web only.
Disabled
The tab can't be selected.
When to use: when the view exists but isn't available right now.
When not to use: when the reason isn't clear. If someone can't tell why a tab is disabled, explain it nearby.
Selected
The tab that is showing its content. On the underline tab, a line marks it. On the pill tab, it has a darker outline and darker text.
Rules and behaviors
Behavior
Single select only. Exactly one tab is selected at a time.
Tapping a tab selects it and switches the content below right away.
Tapping the selected tab does nothing. A tab can't be deselected.
Disabled tabs can't be selected.
Hover and focus apply on web only. Focus shows a ring.
Labels and width
Labels stay on one line and don't wrap.
If the tabs don't fit the width, the row scrolls sideways.
Touch area
The touch area is at least 44 tall, even if the visible tab is shorter.
Keyboard
The left and right arrow keys move between tabs.
Tab moves focus out of the tab row and into the content.
Best practice
Put the most used view first, and select it by default.
Keep labels to one or two words.
Use counts only when they help people decide where to look.
Make sure the content below changes clearly, so people see that the tab worked.
Accessibility
The selected tab is shown with more than color: an underline or a darker outline.
The count is read out together with the label.
Everything can be reached and used with the keyboard.
Focus is shown with a ring.
Disabled tabs can't be selected.
The touch area is at least 44 tall.
