Tabs

Pill or underline tabs with an indicator that glides to the chosen tab. Label colour follows the indicator, and the new panel fades up as the old one fades away.

Preview

Installation

npx @lumioui/cli add tabs

Usage

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

Also exported: TabsList, TabsTrigger, TabsContent.

Examples

Liquid capsule

Glass pill tabs floating over an event photo.

Underline

Underline tabs on a news reader: the underline glides and morphs to each tab's width (transform only), the accent tints the active label.

Spend

Pill tabs as a period switcher on a budgeting card.

API reference

Prop Type Default
value string

Controlled selected value. Omit with defaultValue for uncontrolled use.

—
defaultValue string

Initial value for uncontrolled use.

—
onValueChange (value: string) => void —
variant TabsVariant

Visual variant: "pill" (default, gliding pill) or "line" (underlined list).

"pill"
glass boolean

Glass treatment — pill tabs ride inside a glass capsule and the gliding indicator is a raised glass pill.

false
className string —