Skip to main content

Tabs

Tabs organize content into multiple sections and allow users to navigate between them.

On this page
Overview content
Props
orientation
<Tabs>
  <TabList>
    <Tab id="overview">Overview</Tab>
    <Tab id="usage">Usage</Tab>
    <Tab id="settings">Settings</Tab>
  </TabList>
  <TabPanel id="overview">Overview content</TabPanel>
  <TabPanel id="usage">Usage content</TabPanel>
  <TabPanel id="settings">Settings content</TabPanel>
</Tabs>

Installation

npx shadcn@latest add @dotui/tabs

Usage

Use tabs to organize content into multiple sections and allow users to navigate between them.

import { Tab, TabList, TabPanel, Tabs } from '@/components/ui/tabs'
<Tabs>
  <TabList>
    <Tab id="overview">Overview</Tab>
    <Tab id="usage">Usage</Tab>
    <Tab id="settings">Settings</Tab>
  </TabList>
  <TabPanel id="overview">Overview content</TabPanel>
  <TabPanel id="usage">Usage content</TabPanel>
  <TabPanel id="settings">Settings content</TabPanel>
</Tabs>

Examples

Overview content
Overview content
Overview content
Overview content
Overview content
Overview content
Overview content

Selected tab: overview

API Reference

Tabs

Tabs organize content into multiple sections and allow users to navigate between them.

PropType
ReactNode | function
boolean
"automatic" | "manual"
Orientation
Key
Key
function
Iterable<Key>

TabList

A TabList is used within Tabs to group tabs that a user can switch between.

PropType
TabsVariant
ReactNode | function
Iterable<unknown>
readonly any[]

Tab

A Tab provides a title for an individual item within a TabList.

PropType
ReactNode | function
Key
boolean

TabIndicator

An animated indicator of selection state within a group of items.

PropType
ReactNode | function
boolean

TabPanel

A TabPanel provides the content for a tab.

PropType
ReactNode | function
Key
boolean

Last updated on 6/16/2026