Edit page

Tabs

The Tabs component consists of clickable tabs that are aligned side by side. The <TabNav/> should describe the Tab navigation items and <TabContents/> should describe the sections within. Any DOM node can be passed as children to the tab section.

Import Syntax

Basic Usage

Alternate Styles

Controlled Tabs

Props

Tabs default

PropertyTypeRequiredDefaultDescription
activeTabIndexNumberfalse0The index of the Tab that should be selected and visible.
onTabChangeFuncfalse() => {}Function callback when a TabTitle is clicked.
childrenNodefalse-The content of the component; should be TabNav and TabContents.
grayBoolfalse-Style prop to render a gray Tab.
transparentBoolfalse-Style prop to render a transparent Tab.
translucentBoolfalse-Style prop to render a translucent Tab.
darkBoolfalse-Style prop to render a dark Tab.

TabNav

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component; should be a number of TabTitles.

TabTitle

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The text content of the component.

TabContents

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component; should be a number of TabSections.

TabSection

PropertyTypeRequiredDefaultDescription
childrenNodefalse-The content of the component.