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.

Guide: Animated tabs with a sliding indicator in React Native →

Preview

Installation

npx
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.

Savings pot

One savings pot, three views with different structure: Overview (goal ring and the next deposit), Activity (a dated list) and Rules (switches and a stepper).

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 —