Tabs

Markdown

Switch between related views of the same thing.

Used in AI SDK chat, Workspace integrations, Agent Workbench and 3 more patterns.

Use it for
Switching between related views of one subject.
Not for
Navigating to different pages, or filtering one list. Try NavigationMenu or ToggleGroup.

Tabs preview

Three accounts are ready for owner review.

Installation

npm install @stackunseen/ui
import { Tabs } from '@stackunseen/ui';
Styles: @stackunseen/ui/styles.css

Usage and props

Use for related views on the same page. Inactive content unmounts, so keep drafts and values that must survive switching in the parent component. Give each tab a stable ID and a clear label. A tab opens as soon as it gets focus.

valuestring
The active item value.
onValueChange(value: string) => void
Update value when a different tab is selected.
items{ value: string; label: string; content: ReactNode }[]
Each item needs a unique value, a visible label and its panel content.
labelstring
The accessible name for this group of tabs.
How state and callbacks work
All props

Loading…

For your coding agent

Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.

Contract
value · onValueChange · items · label · orientation?: horizontal | vertical
Keeps honest
Give each tab a stable ID and a clear label. A tab opens as soon as it gets focus.
MCP
read_component "Tabs" on the docs endpoint
Open the Markdown file

Keyboard and customization

Keyboard

Tab focuses the selected tab. Left and Right arrows, Home and End move between tabs and activate them. Tab then moves into the active panel.

Customization

Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio