110k
New

Tabs

A set of layered sections of content—known as tab panels—that are displayed one at a time.

Component tabs-demo not found in registry.

Installation

pnpm dlx createui@latest add tabs

Usage

import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
<Tabs defaultValue="account" className="w-[400px]">
  <TabsList>
    <TabsTrigger value="account">Account</TabsTrigger>
    <TabsTrigger value="password">Password</TabsTrigger>
  </TabsList>
  <TabsContent value="account">Make changes to your account here.</TabsContent>
  <TabsContent value="password">Change your password here.</TabsContent>
</Tabs>

Examples

Line

Use the variant="line" prop on TabsList for a line style.

Component tabs-line not found in registry.

Vertical

Use orientation="vertical" for vertical tabs.

Component tabs-vertical not found in registry.

Disabled

Component tabs-disabled not found in registry.

Icons

Component tabs-icons not found in registry.

API Reference

See the Radix Tabs documentation.