Get started
Fabricator UI

Search documentation

Search pages, components, blocks, styles and colours.

Tabs

PreviousNext

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

Overview
View your key metrics and recent project activity. Track progress across all your active projects.
You have 12 active projects and 3 pending tasks.

Installation

bunx --bun fabricator-ui@latest add tabs

Usage

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

Composition

Use the following composition to build Tabs:

Tabs
├── TabsList
│   ├── TabsTrigger
│   └── TabsTrigger
├── TabsContent
└── TabsContent

Line

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

Vertical

Use orientation="vertical" for vertical tabs.

Disabled

Icons

API Reference

See the React Aria Tabs documentation.