Pure UI
DocsComponentsBlocksNEW
141

Docs

IntroductionGet Started
Installation
Theming

Components

AccordionAvatarBadgeButtonButton GroupCalendarCardCheckboxCollapsibleCombobox
Detached Triggers
DialogInputInput GroupInput OTPKbdLabelMenuNumber FieldPopoverRadio GroupNEWScroll AreaSelectSeparatorSheetSpinnerSwitchTabsNEWTextareaToastTooltip

Tabs

A component for toggling between related panels on the same page.

Installation

Loading content...

Usage

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

Variants

Segmented

Underline

Card

Orientation

You can change the orientation of the tabs to horizontal or vertical by passing the orientation prop to the Tabs component.

Horizontal

Vertical

Panel

You can use the TabsPanel component to render the content of the tabs.

Docs

Docs are a great way to learn about the product and how to use it.

Docs are a great way to learn about the product and how to use it.

Docs are a great way to learn about the product and how to use it.

If content of the tabs vary in height, you can use the TabsPanelsWrapper component to wrap tab panels and the height will be animated smoothly.

Docs

Docs are a great way to learn about the product and how to use it.