Tabs Examples
11 tabbed panels: horizontal, vertical, full width and scrollable lists, with icons, badge counts, nested tabs, and panels that hold forms, tables and cards. Each on React, Vue, Svelte and Solid, with Base UI, React Aria, Ark UI or Radix UI on React.
Every tabs example
11 examples.
- Basic TabsStandardOverview, Analytics, Reports and Notifications in one row. Overview is selected, and its panel is a heading plus a short paragraph.

- Controlled TabsAdvancedStep 1, Step 2 and Step 3 as equal tabs. Step 1 shows Basic Information, and Previous and Next sit under the panel.

- Full Width TabsLayoutAll, Active and Completed split one row into three equal tabs. All lists three tasks, each with a dot beside the title.

- Nested TabsAdvancedProfile, Settings and Billing, and each panel has its own row of tabs. Profile opens on Personal Info for John Doe.

- Scrollable TabsLayoutJanuary through December in one scrolling row of tabs. January is selected and shows Total Tasks 24 and Completed 18.

- Tabs with Badge CountsAdvancedInbox, Unread, Archived and Spam, with count badges 12, 5, 48 and 3. Inbox lists messages with a subject, a sender and a Read or Unread badge.

- Tabs with CardsContentFeatured, Popular and Recent. Each panel is a grid of article cards with a badge, a title, a short description and a Learn More button.

- Tabs with FormsContentLogin and Register split the row in half. Login has Email and Password. Register adds Full Name and Bio, and its button says Create Account.

- Tabs with IconsStandardAccount, Billing, Notifications and Settings, each with an icon before the label. Account is selected and repeats the icon beside its heading.

- Tabs with TablesContentAll Users, Active and Inactive. Each panel is a table of Name, Email, Role and Status for the matching people.

- Vertical TabsLayoutProfile, Security, Preferences and Team stacked beside the panel. Profile is selected and the panel is titled Profile Settings.

Or describe it. With Pro, your AI agent installs the tabs example you describe, on your framework and UI library.
Get ProGalleries
More component examples
8 related galleries, free: open one for its live examples and their code.
Pricing
Tabs examples MCP, with Pro
Your AI agent installs any of the 1364 examples, and every component, block and icon, with every Pro plan.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
Tabs show one of several related panels in the same place: a row of triggers, and the panel for the selected one below it. shadcn.io's Tabs is built on Base UI, React Aria, Ark UI or Radix UI in React, and on Ark UI in Vue, Svelte and Solid. Each gives the tab list the WAI-ARIA tabs roles and keyboard support, styled with Tailwind CSS. Every example here is one small file showing one pattern.
Yes. Every example is free to use in personal and commercial projects, with no attribution. Seeing the code and installing it takes a free shadcn.io account.
Tabs when people switch often between views and only one matters at a time, such as settings sections. An Accordion when several sections can be open at once, such as an FAQ. Separate pages when each view deserves its own URL, for sharing, search or the back button.
When people would share or bookmark a specific tab, yes: read the tab from a search parameter and control the tabs with it, as the Controlled Tabs example controls them from state. For in-page switching nobody links to, the tabs can keep their own state.
Set the orientation to vertical on Tabs, as the Vertical Tabs example does. The list stacks beside the panel, the triggers align to the start, and Up and Down move between them. On a narrow screen, switch back to horizontal or a scrollable list.
Put a Badge inside the trigger after its label; the trigger's gap spaces it. The Tabs with Badge Counts example shows inbox counts. Keep counts for tabs whose number actually helps people choose.
Wrap the tab list in a ScrollArea with whitespace-nowrap, so the triggers stay on one line and scroll sideways. The Scrollable Tabs example does this with twelve months.
Sign in, open the example, and run the install command under Installation. The CLI adds the example to your project along with the Tabs component and anything else it uses, for the framework and library you picked.
No. By default only the selected panel is rendered, so state inside the others resets when you come back. Each example's FAQ names the prop that keeps panels mounted on your library, for forms or anything else that should survive a switch.
Pass the selected value and a change handler to Tabs, as the Controlled Tabs example does with its Previous and Next buttons. The prop names differ by library; that example's FAQ lists them.
shadcn.io's Tabs (built on Base UI, React Aria, Ark UI or Radix UI in React, and Ark UI in Vue, Svelte and Solid), Tailwind CSS, and Lucide icons where an example shows them. Some examples also use Badge, Button, Field, Input, ScrollArea or Table.
Yes. The list has the tablist role, each trigger the tab role with its selected state, and each panel the tabpanel role linked to its trigger. The arrow keys move between triggers, and Home and End jump to the first and last.
Tabs is a client component, since it keeps the selected tab and handles keys. Render it inside a server-rendered page; the panels' content can come from the server as props or children.
4.9 out of 5 from 150+ developers
Every tabs example. One prompt away.
Every tabs example is free with an account. With Pro, your AI agent installs them from a prompt.
Get Pro


















