esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • Book a callContact
  • Download ResumeContact
Let’s talk

I’ll build the agent for it.

Tabs: Switch Between Related Views on One Screen Without Losing Your Place

Learn when a design system should use tabs, when it should not, and which states, rules, and keyboard behavior make the component reliable.

In short

Tabs let people switch between related views on one screen, and a design system defines when to use them, their states, rules and keyboard behavior.

12 min readFree

What you will learn

This lesson explains tabs. A tab set splits related content into labeled panels on one screen. The user clicks a label, and the matching content appears, without leaving the page. You will learn what tabs are, when a team should use them, when it should choose another pattern, which states and rules a tab component needs, and how keyboard and screen reader users move through it.

In a design system, tabs are more than a row of labels. Tabs are a reusable component, built once and used by many product teams. The system defines its states, its behavior, and its rules for when to use it, so every team builds the same thing.

Key words

Tab
A clickable label that names one view of content.
Panel
The area below the tabs that shows the content of the chosen tab.
Tab list
The group that holds all the tabs together.
Component
A reusable piece of a design system, such as a button or a tab set.
Pattern
A known solution to a common design problem, such as tabs or an accordion.
State
A version of a component that shows its condition, such as selected, hover, focus, or disabled.
Focus
The visible marker that shows which element a keyboard user is on right now.
Screen reader
Software that reads screen content aloud for people who cannot see it well.

What are tabs?

Tabs let a user view one panel from a set of options. The other options stay one click away. Because the page address and the surrounding layout stay put, users keep their place while they explore.

Nielsen Norman Group describes tabs as a way to view a single panel of content from among a list of options. Tabs are often a flat row at the top of a section, but the idea is the same wherever they sit.

Tabs work best when the choices are peers.

What are the parts of a tab set?

  • Tab list

    The row that holds every tab. It shows the user what options exist, all at once.

  • Tab

    One label, such as Security. It should be short and specific, so the user can guess what is inside.

  • Selection indicator

    The mark that shows which tab is active. It can be an underline, a filled background, or a border.

  • Active panel

    The one content area that is visible right now. A tab set shows only one panel at a time.

When should you use tabs?

Use tabs when the sections are peers at the same level, the user might visit any of them, and the user usually needs only one at a time. A good test is to ask whether the user would ever need two of these panels on screen together. If the answer is often yes, tabs are the wrong choice.

  • Parallel sections

    A product page can split into Details, Reviews, and Shipping. Each one stands on its own, so a user can move between them freely.

  • Lengthy content with clear groups

    Tabs break long content into small, scannable pieces. Users see only the group they want, instead of one very long page.

  • Short labels

    Short tab labels take less horizontal space and avoid scrolling. Each label should name its content in a word or two.

  • A small number of options

    Some guides suggest keeping a tab set small. A large set is hard to scan, so another pattern usually works better.

Tip

Before you add tabs, write down what each panel contains. If the panels are not parallel, or one panel is clearly more important, reconsider the pattern.

When should you not use tabs?

Tabs hide everything except one panel. That makes them a poor fit for several common jobs. The list below shows the most frequent mistakes.

  • Sequential steps

    In a checkout or setup flow, step two often needs answers from step one.

  • Comparing information

    If users need to compare prices or options across sections, tabs force them to switch back and forth. That costs memory and time, so one long page can work better.

  • Long labels

    Long labels crowd the tab list and make the bar hard to read. Shorten the label or move the content to another pattern.

  • Too many items

    When tabs do not fit in one row, many designs hide the extra tabs behind arrows or a scroll. Hidden tabs are harder to find, so users may miss content.

  • Content that must be seen

    The default tab gets the most attention, while other tabs may be ignored. Put critical content on the page itself, not in a tab that users might skip.

  • Separate pages

    If each option opens its own web address, use navigation links, not tabs. Tabs are for panels on the same page.

Nested tabs, which are tabs inside tabs, are also a common mistake. Designers who write guidelines often recommend accordions or dropdowns for a second level instead.

How do tabs compare with other patterns?

  • Accordion

    Stacked sections that open and close in place. An accordion fits when several sections may be open at once, which tabs do not allow.

  • Stepper

    A set of ordered steps that shows progress. Choose it when the user must finish one step before the next.

  • Navigation links or sidebar

    A list of links that opens separate pages. Choose it when the sections are big enough to deserve their own address.

  • Dropdown

    A closed box that opens a list so the user picks one option. It saves space for long lists. The Dropdowns lesson covers it in depth.

States and design choices

A design system must define every state of a tab, so that teams draw each one the same way. It must also set the design choices that change how the tab list looks on different screens.

Tab states

  • Default

    The tab is visible and can be chosen, but it is not active. Unselected tabs must stay visible so users know the options exist.

  • Hover

    The pointer rests over the tab. A small change in color or underline tells the user the label can be clicked.

  • Focus

    The tab is the current position for a keyboard user. It needs a high-contrast focus highlight, so the user can see where they are.

  • Selected

    The tab is active and its panel is showing. The selected state needs a clear indicator that does not depend on color alone. An underline, a bold label, or a border can add that clarity.

  • Disabled

    The tab is shown but cannot be chosen right now.

Design choices

  • Label length

    Keep labels short and specific. Short labels save room and keep the row on one line.

  • Overflow handling

    When the tabs do not fit, some designs add an arrow or scroll button that reveals hidden tabs. Hidden tabs are harder to discover, so the better fix is to reduce the number of tabs.

  • Horizontal or vertical layout

    Horizontal tabs are the usual choice and should stay in one row.

  • Icons

    An icon can support a tab, but it should appear with a text label. An icon alone is hard to understand.

Tip

Write these choices into the component rules once. A team that knows the limits will not invent its own version.

Worked example: a code project page

Picture a code project page with tabs labeled Code, Issues, and Pull Requests. Each tab shows a different view of the same project. Follow the steps below to see how the ideas in this lesson apply to that screen.

  1. 1

    Check the fit

    The three views are peers. They all describe one project, and a user usually looks at one view at a time. That makes tabs a reasonable choice.

  2. 2

    Name each tab with a short noun

    Code, Issues, and Pull Requests are short and match words that users already know. Long phrases would crowd the row.

  3. 3

    Show the selected tab clearly

    The active tab gets an indicator that a user can see without relying on color alone. A user should know at a glance which view is open.

  4. 4

    Add a count only where it helps

    A small number beside a label, such as the number of open issues, tells the user something useful before they click. Add counts to some tabs only, and only when the number helps a decision.

  5. 5

    Keep the panel under the tabs

    When the user switches tabs, only the content below changes. The project name and the page address stay in place, so the user keeps their context.

  6. 6

    Test the keyboard path

    A keyboard user should reach the tab row with one Tab press, move between tabs with the arrow keys, and then move into the panel. If the tabs fail this test, the design is not finished.

Behavior and keyboard use

A tab set must behave the same way every time. A click, a tap, and a key press should each lead to the same result, which is one selected tab and one visible panel.

Keyboard movement

  1. 1

    Enter the tab list

    The Tab key moves focus onto the selected tab. The whole tab list counts as one stop in the Tab order, so keyboard users are not forced to press Tab through every label.

  2. 2

    Move with the arrow keys

    In a horizontal list, the Left and Right arrow keys move to the previous or next tab. In a vertical list, the Up and Down arrow keys do the same. Going past the last tab can wrap back to the first.

  3. 3

    Jump with Home and End

    Home moves to the first tab and End moves to the last. The W3C guidance marks these keys as optional, so a team should decide whether to include them and document that choice.

  4. 4

    Choose the tab

    If the tab does not change as soon as it gets focus, Enter or Space selects it. Some teams prefer that focus alone switches the panel. The W3C guidance recommends automatic switching only when the panel appears without a noticeable delay.

  5. 5

    Leave the list

    Pressing Tab again moves focus out of the tab list and into the active panel or the next control on the page.

Accessibility basics

Accessibility means that people with different abilities, and people who use tools such as screen readers, can use the product. Tabs are easy to build badly. A row of plain buttons may look right, but a screen reader may not announce it as a set of tabs. Standard roles solve that problem.

  • The tablist role

    This role names the whole group. Give the group a label such as Account settings, so a screen reader can say what the set is for.

  • The tab role

    This role marks each label as a choice. Each tab also tells the software whether it is selected, using a selected flag.

  • The tabpanel role

    This role marks the content area. Each panel links back to its tab, so the screen reader can say which tab the content belongs to.

Accessibility.build recommends a real button for each tab when possible. A button already works with the keyboard and is already announced as interactive, so the team adds only the tab details on top.

Tip

Keep the selected state visible without color alone, and keep the focus highlight high in contrast. Detailed audits and test methods belong to the Accessibility Testing lesson.

Writing the component rules

In a design system, Tabs is documented once and reused everywhere. The rules turn a good idea into a shared decision. Without rules, each team will guess when to use tabs and how many to show.

  1. 1

    State the purpose

    Write one sentence: tabs switch between peer panels on one page, one at a time.

  2. 2

    List the states

    Describe default, hover, focus, selected, and disabled, with a picture or example for each.

  3. 3

    Set the limits

    Agree on a maximum tab count and a label length. Pick a small maximum as a starting point, then have the team test whether users can still find every tab.

  4. 4

    Define overflow

    Say what happens when the tabs do not fit. Many teams choose to reduce the count rather than hide tabs.

  5. 5

    Define keyboard behavior

    Write down the arrow keys, Home and End, and the selection rule, so every build behaves the same way.

  6. 6

    Show do and do not examples

    Include one correct use and one common mistake, such as a multi-step form placed in tabs.

Tip

Keep the rules short. Teams read a short rule and remember it, while a long rule gets skipped.

Check your understanding

Quick check

A settings page has five sections: Profile, Security, Notifications, Billing, and Integrations. Users move between them often, and each section is independent. A teammate proposes a multi-step wizard that moves users through the sections in order. Would tabs fit better, and why?

Quick check

A product team must show 14 product categories on one screen. Several category names are long, such as Outdoor Equipment and Camping Gear. Which choice fits the tabs rules best?

Key takeaways

  • Use tabs for peers

    Choose tabs for sections at the same level that users switch between, one at a time.

  • Avoid tabs for steps and comparisons

    Use a stepper for ordered steps, and avoid tabs when users must compare content across sections.

  • Define every state and rule

    A design system makes tabs reliable by setting their states, their limits, and their keyboard behavior in one shared place.

Sources

How is this lesson?

Last updated on 17 November 2026

Learn with me

Every lesson is free. I add new ones as I learn. Have a question, or want help with your own work? Book a short call.