Skip to main content

Tabs

Organize content into switchable panels, built on Base UI.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
itemsTabItem[]-
defaultValuestring-
valuestring-Controlled selection.
Controlled selection.
onValueChange(value: string) => void-Called with the newly selected tab's value.
Called with the newly selected tab's value.
orientationhorizontal | verticalhorizontalvertical stacks the tabs and sits any panels beside them rather than below.
vertical stacks the tabs and sits any panels beside them rather than below.
iconbooleantrue
iconPositionleading | trailingleading
childrenReactNode-Panels of your own, from Base UI's Tabs.Panel, after the list in the same tabs, for panels laid out other than as cards.
Panels of your own, from Base UI's Tabs.Panel, after the list in the same tabs, for panels laid out other than as cards.
sizesm | md | lgmdTab padding and label size together.
Tab padding and label size together.
shapenone | rounded | pillrounded
animatedbooleantrue
classNamestring-
focusboolean | stringtrue