Tabs

Segmented control tabs with sliding active indicator, proximity hover, and spring animations.

Installation

Installs the Base UI flavor. Switch in the right panel.

Basic

Inspect

Library content.

With Icons

Inspect

Library content.

Controlled

Inspect

Library content.

Active: library

API Reference — Tabs

PropTypeDefaultDescription
valuestring—Controlled active tab value. Takes precedence over selectedIndex.
onValueChange(value: string) => void—Called when the active tab changes.
selectedIndexnumber—Index-based controlled alternative.
onSelect(index: number) => void—Called with the new index when the active tab changes.
defaultValuestring—Default active tab for uncontrolled usage.
childrenReactNode—TabsList and TabPanel children.

API Reference — TabsList

PropTypeDefaultDescription
childrenReactNode—TabItem children.
classNamestring—Additional CSS classes for the container.

API Reference — TabItem

PropTypeDefaultDescription
valuestring—Unique value identifying this tab.
iconIconComponent—Optional leading icon.
labelstring—Text label for the tab.

API Reference — TabPanel

PropTypeDefaultDescription
valuestring—Must match a TabItem value.
childrenReactNode—Panel content, rendered when the matching tab is active.