Tabs

Toggle through grouped options with segmented or underline styles

import { Tabs } from "@plexui/ui/components/Tabs";

Examples

Overview

variant
orientation
size

Segmented with icons

size

Segmented with badge

size

Underline

size

Underline flush

size

Underline block

size

Underline with icons

size

Underline with badge

size

Vertical segmented

size

Vertical underline

size

Vertical underline with icons

size

Disabled tab

variant
size

Sizing

variant
size

Tabs shares the unified 9-step size scale with Button, Input, Select, and SelectControl.

Migration from SegmentedControl

Tabs replaces and extends SegmentedControl. The old import still works as a backward-compatible alias:

// Old (still works)
import { SegmentedControl } from "@plexui/ui/components/SegmentedControl";
<SegmentedControl.Option value="a">A</SegmentedControl.Option>

// New (recommended)
import { Tabs } from "@plexui/ui/components/Tabs";
<Tabs.Tab value="a">A</Tabs.Tab>

Both Tabs.Tab and Tabs.Option are available as sub-components. The SegmentedControl alias defaults to variant="segmented".

Reference

Tabs (root)

PropTypeDefaultDescription
valuestringSelected tab value (controlled)
onChange(value: string) => voidCalled when selection changes
variant"segmented" | "underline""segmented"Visual style — segmented (background highlight) or underline (line indicator)
orientation"horizontal" | "vertical""horizontal"Layout direction of the tab group
sizeControlSize"md"Control height (3xs through 3xl)
gutterSizestringHorizontal padding of tabs
pillbooleantrueFully rounded control (segmented variant only)
flushbooleanfalseText-width indicator, no border, gap spacing (underline variant only)
blockbooleanfalseFull-width control with equal-width tabs
disabledbooleanfalseDisable all tabs
aria-labelstringAccessible name (required)

Tabs.Tab

PropTypeDefaultDescription
valuestringTab value
disabledbooleanDisable this tab
iconReactNodeIcon element (sized automatically)
badgenumber | { content: ReactNode; color?: string; variant?: string }Badge/count or custom badge config
aria-labelstringAccessible name (required for icon-only tabs)