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
defaultValuestring—The value of the tab that should be active by default.
valuestring—Controlled active tab value.
onValueChange(value: string) => void—Callback fired when the active tab changes.
classNamestring—Additional 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.
classNamestring—Additional CSS classes.

TabsTrigger props

PropTypeDefaultDescription
value*string—The value that identifies this tab.
disabledbooleanfalseDisables interaction with the trigger.
classNamestring—Additional CSS classes.

TabsContent props

PropTypeDefaultDescription
value*string—Must match the corresponding TabsTrigger value.
classNamestring—Additional CSS classes.