Tabs UI Design
Tabs let users switch between related views without leaving the page. They work when the views are parallel and users only need one at a time.
By Mohamed Farhan · Updated Oct 19, 2026
Inside the example
The live example above is plain HTML with Tailwind utility classes, so you can paste it into any Tailwind project. It uses type sizes text-sm (14px) and spacing gap-1 (4px), p-1 (4px), px-3 (12px), py-2 (8px), mt-3 (12px), p-4 (16px), constrained by max-w-md. Everything sits on a 4px grid, which keeps rhythm consistent when you adapt it.
Colors use Tailwind's neutral stone scale so the pattern stays brand-agnostic. Swap stone-900 for your primary color on the main action, keep body text dark and check contrast after any change.
Anatomy
- 1.Tab list
- A row of short labels.
- 2.Selected indicator
- Underline, fill or weight change on the active tab.
- 3.Panel
- The content for the selected tab.
- 4.Overflow
- Scroll or a 'More' menu when tabs do not fit.
Common variations
- Underline tabs, with an indicator under the active label. Common in content and settings pages.
- Segmented control, a pill-shaped group used to switch views or filters.
- Vertical tabs, used in settings panels with many sections.
- Scrollable tabs, for many categories on mobile.
States to design
- Inactive: readable label, lower emphasis.
- Hover and focus: visible change; focus ring for keyboard users.
- Active: indicator, stronger label and aria-selected="true".
- Disabled: clearly unavailable, with a reason if possible.
A walkthrough
An account owner opens settings to update a card. The page shows four tabs at the top: Profile, Billing, Team and Security, with Profile selected by default. He clicks Billing, and the panel below changes immediately without a page reload, while the URL updates so he could share or bookmark the Billing view.
Using only the keyboard, he presses Tab to reach the tab row and then the arrow keys to move between tabs, the same way he would in a desktop application. On his phone, the tabs become a horizontally scrollable row with the selected tab clearly marked, and a subtle fade at the edge hints that Security is just off screen.
Behind the scenes, only the selected tab is in the keyboard tab order, so pressing Tab again moves him into the Billing form rather than through every tab label. When he leaves with unsaved changes in the card form and clicks Team, the product asks whether to save first, because switching tabs should never silently discard work.
How different products use it
Product pages use tabs for Description, Specifications, Reviews and Shipping.
Settings pages use tabs or vertical tabs for Profile, Account, Billing, Team and Security.
Dashboards use tabs or segmented controls to switch time ranges or views of the same data.
Visual design guidelines
Tab labels are usually 14 to 16px with 16 to 24px horizontal padding. The active indicator should be clearly visible, such as a 2px underline or a filled segment, and it can animate smoothly between tabs. Keep the tab row attached to its panel with consistent spacing, and avoid icons unless they add real meaning.
Best practices
Do
- Use one or two words per tab label.
- Keep the tab row directly attached to its panel.
- Remember the last selected tab where it helps.
- Make the active state obvious with more than color.
Don't
- Do not use tabs for sequential steps; use a stepper.
- Do not nest tabs inside tabs.
- Do not hide critical content in a non-default tab.
On mobile
On mobile, tabs should scroll horizontally if they do not fit, with a visual hint that more tabs exist. For three or fewer options, a full-width segmented control works well. For many sections, consider a select menu instead.
Common mistakes
- Using tabs for steps, which implies the user can skip around.
- Too many tabs, which become hard to scan.
- Hiding important content in a non-default tab.
- Weak active state, especially relying only on color.
Edge cases to plan for
- Dynamic tabs that can be added or closed (like browser tabs) need close buttons and overflow handling.
- Tabs with unsaved changes should warn before switching.
- Very long labels in translations may need truncation or a different layout.
- Deep links to a tab should open it directly.
Accessibility checklist
- Use role="tablist", role="tab" and role="tabpanel" with aria-selected.
- Support arrow keys to move between tabs.
- Connect each tab to its panel with aria-controls.
Implementation notes
Follow the WAI-ARIA tabs pattern: a tablist containing tabs, each controlling a tabpanel. Support arrow keys to move between tabs and Home and End to jump to the first and last. Only the active tab should be in the tab order.
In your design system
In a design system, tabs usually ship as a tablist, tab and tabpanel trio with variants for underline, segmented and vertical styles. Define tokens for label size, padding and the active indicator, and include keyboard behaviour in the component so every product team gets accessible tabs by default.
How to measure whether it works
Track which tabs are visited. If most users never open a tab, its content may not be needed or may belong elsewhere. If nearly everyone switches to the same tab, consider making it the default.
Pre-launch checklist
Microcopy you can use
A step-by-step design process
- Confirm tabs are right: content should be parallel and needed one at a time.
- Write short labels and choose the default tab.
- Choose the style: underline, segmented or vertical.
- Design overflow for small screens and long translations.
- Implement keyboard behaviour with arrow keys.
- Decide URL behaviour for shareable tabs.
Usability test tasks
Before shipping, run a short usability test with five or so people from your audience. Give them tasks rather than instructions and watch where they hesitate:
- Switch to the Billing tab and back.
- Use the keyboard to move between tabs.
- Share a link that opens the Reviews tab.
- Tell which tab is currently selected.
Key terms
- Tablist: The container element that holds the tabs.
- Tabpanel: The content area controlled by a tab.
- Segmented control: A compact group of options, often used like tabs.
- Roving tabindex: A technique where only the active tab is in the tab order.
Writing the copy
Use short, parallel nouns: Overview, Activity, Settings. Keep labels consistent in grammar and length. Counts can be added in parentheses, such as Reviews (128), when they help users decide.
Prompts to generate variations
If you use an AI UI generator such as Inspo AI, these prompts are a good starting point for exploring variations of this pattern:
- Design a tabbed settings page with Profile, Billing, Team and Security in a segmented-control style.
- Create product detail tabs for Description, Specifications, Reviews and Shipping with scrollable mobile tabs.
- Design a dashboard time-range switcher using a segmented control.
Related patterns
Tabs are related to stepper UI for sequential flows and to accordions in the FAQ section. App-level navigation should use a sidebar instead.
Generate this pattern for your product
Inspo AI designs the full pattern with every state, grounded in how real products solve it, and exports React + Tailwind.
Sources and further reading
- WAI-ARIA APG: Tabs UI · The W3C reference for accessible keyboard and screen reader behaviour.
- WCAG 2.1: Non-text Contrast · Contrast requirements for buttons, borders and icons.
- WCAG 2.1: Use of Color · Why color should never be the only way information is shown.
- Nielsen Norman Group articles · Usability research on interface patterns.
More UI patterns
Questions people ask
When should I use tabs?
When content splits into a few parallel views and users only need one at a time, such as settings sections or product details.
How many tabs is too many?
More than five or six becomes hard to scan. Consider a sidebar or a select menu instead.
Tabs vs segmented control: what is the difference?
Segmented controls usually switch a view or filter of the same content; tabs switch between different content panels. Visually they can be similar.
Should tab switching change the URL?
For important views users may want to share or bookmark, yes. Use the URL hash or a query parameter.
Tabs or accordion on mobile?
Accordions often work better on narrow screens when sections are long, because users can see all headings at once.

↘ Building Inspo AI | AI-Powered Design Research & Builder Platform | Design Engineer.