Tabs

The <Tabs /> component renders accessibility-focused tab controls.

Built on top of the Reach UI Tabs.

import {
Box,
Flex,
Tabs,
TabList,
Tab,
TabPanels,
TabPanel,
useTabContext,
} from 'minerva-ui'

Tabs with underline

Preview
Source

Vertical Tabs

Preview
Source

Tabs with custom underline

Preview
Source

Tabs with underline and icons

Preview
Source

Tabs in pills

Preview
Source

Tabs in pills on gray

Preview
Source

Tabs in pills with brand color

Preview
Source

Props

Props are all extended from Reach UI's <Tabs /> component

<Tabs />

NameTypeIs RequiredDefaultDescription
defaultIndexnumberoptionalnoneInitial active tab index
indexnumberoptionalnoneActive tab index
onChangefunctionoptionalnoneCallback that's triggered whenever a new tab is selected
keyboardActivationauto or manualoptionalautoWhen auto, tabs are activated when focused, when manual you must press Spacebar or Enter to activate tabs
orientationhorizontal or verticaloptionalhorizontalChange direction of tabs

<TabsList />

NameTypeIs RequiredDefaultDescription
childrennodeoptionalnone

<Tab />

NameTypeIs RequiredDefaultDescription
childrennodeoptionalnone
disabledbooleanoptionalfalseDisable clicking or focusing tab

<TabPanels />

NameTypeIs RequiredDefaultDescription
childrennodeoptionalnone

<TabPanel />

NameTypeIs RequiredDefaultDescription
childrennodeoptionalnone