Tabs

Line

default
blue
emerald

Solid

default
blue
emerald

Tabs

Accessible tabbed navigation built on Radix UI Tabs. Supports line and solid variants with icon support, disabled states, and keyboard navigation.

Usage

import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"

<Tabs defaultValue="overview">
  <TabsList variant="line">
    <TabsTrigger value="overview">Overview</TabsTrigger>
    <TabsTrigger value="settings" disabled>Settings</TabsTrigger>
  </TabsList>
  <TabsContent value="overview">Overview content</TabsContent>
  <TabsContent value="settings">Settings content</TabsContent>
</Tabs>

Tabs props

PropTypeDefaultDescription
defaultValuestringThe value of the tab that should be active by default.
valuestringControlled active tab value.
onValueChange(value: string) => voidCallback fired when the active tab changes.
classNamestringAdditional CSS classes for the root element.

TabsList props

PropTypeDefaultDescription
variant"line" | "solid""line"Visual style. "line" shows an underline indicator; "solid" shows a pill with background.
color"default" | "blue" | "red" | "green" | "orange" | "purple" | "indigo" | "pink" | "yellow" | "emerald""default"Color of the active tab indicator. Affects the underline (line) or background (solid) of the selected trigger.
classNamestringAdditional CSS classes.

TabsTrigger props

PropTypeDefaultDescription
value*stringThe value that identifies this tab.
disabledbooleanfalseDisables interaction with the trigger.
classNamestringAdditional CSS classes.

TabsContent props

PropTypeDefaultDescription
value*stringMust match the corresponding TabsTrigger value.
classNamestringAdditional CSS classes.