TrademarkTrademark
Docs
Ctrl k
Search docs...
Components

Tabs

Updated: October 18, 2026
View on GitHub
Soon
Not released yet. This is on main and is not in any published version yet. It will not install today.

Tabs holds one TabList of Tabs and a TabPanel for each tab, matched by value. Each Tab is a ToggleButton with the tab role, so it takes every ToggleButton prop. The first enabled tab is selected unless you pick one. See the web Tabs for the same component in the browser.

Uncontrolled

Pass defaultValue to choose the first tab, or leave it out to start on the first enabled one.

Controlled

Pass value and onChange when the screen owns the selection. onChange is not called for the tab that is already selected.

Vertical

orientation="vertical" puts the list beside the panels, as a settings screen does. Tabs then fill the list's width with their label at the start, and the panel takes the rest of the row.

Keep panels mounted

An unselected panel renders nothing by default. Pass keepMounted to keep it mounted and hidden, so a form in it keeps what was typed.

Differences from the web

  • There is no arrow-key navigation on a touch screen, so activation is accepted and has no effect.
  • Tabs also takes core 3.0's onValueChange, called with the same value as onChange.
  • Each panel is labelled by its tab for screen readers.

API reference

Tabs

Takes every Flex prop. It is a Column, or a Row when vertical, with fillWidth and gap="16".

Prop
Type
Default
Description
valuestringThe selected tab's value, when the screen owns the state. Pair with onChange.
defaultValuestringfirst enabled tabThe tab selected first when Tabs keeps its own state.
onChange(value: string) => voidCalled with the newly selected tab's value.
onValueChange(value: string) => voidCore 3.0's name for onChange.
orientation"horizontal" | "vertical""horizontal"vertical puts the list beside the panels.
activation"automatic" | "manual"Accepted for core's API. Has no effect.
childrenReactNodeA TabList and the TabPanels.

TabList

Takes every Flex prop. A Row with gap="4", or a Column when vertical. Name it with aria-label when nothing on screen labels it.

Tab

Takes every ToggleButton prop except selected.

Prop
Type
Default
Description
valuestringMatches the TabPanel this tab shows, and is what onChange reports. Required.
disabledbooleanfalseThe tab stays visible and cannot be picked.
labelReactNodeThe tab's text.
onPress(event) => voidCalled on press, before the tab is selected. onClick also works.

TabPanel

Takes every Flex prop.

Prop
Type
Default
Description
valuestringThe value of the Tab that shows this panel. Required.
keepMountedbooleanfalseKeeps the content mounted, hidden, while another tab is selected.
childrenReactNodeThe panel's content.
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club