Components

Tabs

Switch between alternate content panes, with optional persistence.

Use Tabs and Tab when readers should choose among alternatives in the same space — languages, platforms, or product modes. For tabbed code only, prefer Code Group.

Basic usage#

Content for JavaScript developers.

Persist selection with group#

Tabs that share a group id restore the last selected tab from localStorage under shiso-tabs:<group>.

A single Tab child renders as plain content with no tab chrome.

Properties#

Tabs#

NameTypeDescription
groupstring

Shared id for persisting the selected tab across tab sets.

childrenReactNode

One or more Tab children.

Tab#

NameTypeDescription
titleReactNode

Tab label. Falls back to Tab 1, Tab 2, and so on.

childrenReactNode

Panel content.

Last updated on