Tabs Examples

A set of layered sections of content that display one panel at a time.

Tab Variants

Default Tabs

The default tab style with a subtle background

Account Settings

Manage your account settings and preferences.

Underline Tabs

Tabs with an underline indicator

Overview

View a summary of your account activity.

More Tab Variants

Pills Tabs

Tabs with a pill-shaped indicator

Messages

View your recent messages and conversations.

Boxed Tabs

Tabs with a boxed appearance

Profile

Manage your profile information.

Advanced Tab Variants

Vertical Tabs

Tabs arranged vertically

General Settings

Configure general application settings.

Tabs with Icons

Tabs with both icons and text

Home

Welcome to your dashboard.

Controlled Tabs

This example demonstrates controlled tabs where the active tab is managed by state.

Account Settings

Manage your account settings and preferences.

Tab Props

The Tabs component API reference.

Tabs

A set of layered sections of content that display one panel at a time.

PropDescriptionTypeDefault
defaultValueThe default value of the tabs (uncontrolled).string-
valueThe controlled value of the tabs. Must be used with onValueChange.string-
onValueChangeCallback when the value changes.(value: string) => void-
orientationThe orientation of the tabs."horizontal" | "vertical""horizontal"
variantThe visual style of the tabs."default" | "underline" | "pills" | "boxed""default"
sizeThe size of the tabs."sm" | "md" | "lg""md"

TabsTrigger

The button that activates its associated content.

PropDescriptionTypeDefault
valueThe value of the tab. Must match the value of the corresponding TabsContent.string-
disabledWhether the tab is disabled.booleanfalse
iconOptional icon to display alongside the tab text.React.ReactNode-

TabsContent

The content associated with a tab trigger.

PropDescriptionTypeDefault
valueThe value of the tab content. Must match the value of the corresponding TabsTrigger.string-
forceMountForce mounting the content when it's not active.booleanfalse