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
My Account!
Favorites!
Orders!
Billing!
Source
Vertical Tabs
Preview
My Account!
Favorites!
Orders!
Billing!
Source
Tabs with custom underline
Preview
My Account!
Favorites!
Orders!
Billing!
Source
Tabs with underline and icons
Preview
My Account!
Favorites!
Orders!
Billing!
Source
Tabs in pills
Preview
My Account!
Favorites!
Orders!
Billing!
Source
Tabs in pills on gray
Preview
My Account!
Favorites!
Orders!
Billing!
Source
Tabs in pills with brand color
Preview
My Account!
Favorites!
Orders!
Billing!
Source
Props
Props are all extended from Reach UI's <Tabs />
component
<Tabs />
Name | Type | Is Required | Default | Description |
---|---|---|---|---|
defaultIndex | number | optional | none | Initial active tab index |
index | number | optional | none | Active tab index |
onChange | function | optional | none | Callback that's triggered whenever a new tab is selected |
keyboardActivation | auto or manual | optional | auto | When auto , tabs are activated when focused, when manual you must press Spacebar or Enter to activate tabs |
orientation | horizontal or vertical | optional | horizontal | Change direction of tabs |
<TabsList />
Name | Type | Is Required | Default | Description |
---|---|---|---|---|
children | node | optional | none |
<Tab />
Name | Type | Is Required | Default | Description |
---|---|---|---|---|
children | node | optional | none | |
disabled | boolean | optional | false | Disable clicking or focusing tab |
<TabPanels />
Name | Type | Is Required | Default | Description |
---|---|---|---|---|
children | node | optional | none |
<TabPanel />
Name | Type | Is Required | Default | Description |
---|---|---|---|---|
children | node | optional | none |