Tabs
Tabs are UI elements for organizing and navigating between groups of related content.
Tab API
Import
import { Tab } from '@mui/base/Tab';
// or
import { Tab } from '@mui/base';
Props of the native component are also available.
A ref for imperative actions. It currently only supports focusVisible()
action.
Type:func
| { current?: { focusVisible: func } }
The components used for each slot inside the Tab. Either a string to use a HTML element or a component.
See Slots API below for more details.
Type:{ root?: elementType }
Default:{}
ref
is forwarded to the root element.To learn how to customize the slot, check out the Overriding component structure guide.
These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
TabPanel API
Import
import { TabPanel } from '@mui/base/TabPanel';
// or
import { TabPanel } from '@mui/base';
Props of the native component are also available.
The components used for each slot inside the TabPanel. Either a string to use a HTML element or a component.
See Slots API below for more details.
Type:{ root?: elementType }
Default:{}
ref
is forwarded to the root element.To learn how to customize the slot, check out the Overriding component structure guide.
These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
Tabs API
Import
import { Tabs } from '@mui/base/Tabs';
// or
import { Tabs } from '@mui/base';
Props of the native component are also available.
The component orientation (layout flow direction).
Type:'horizontal'
| 'vertical'
Default:'horizontal'
If true
the selected tab changes on focus. Otherwise it only changes on activation.
Type:bool
The components used for each slot inside the Tabs. Either a string to use a HTML element or a component.
See Slots API below for more details.
Type:{ root?: elementType }
Default:{}
ref
is forwarded to the root element.To learn how to customize the slot, check out the Overriding component structure guide.
These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
TabsList API
Import
import { TabsList } from '@mui/base/TabsList';
// or
import { TabsList } from '@mui/base';
Props of the native component are also available.
The components used for each slot inside the TabsList. Either a string to use a HTML element or a component.
See Slots API below for more details.
Type:{ root?: elementType }
Default:{}
ref
is forwarded to the root element.To learn how to customize the slot, check out the Overriding component structure guide.
These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.