TabList API
API reference docs for the React TabList component. Learn about the props, CSS, and other APIs of this exported module.
Demos
Import
import TabList from '@mui/lab/TabList';
// or
import { TabList } from '@mui/lab';
Learn about the difference by reading this guide on minimizing bundle size.
Props of the Tabs component are also available.
Name | Type | Description |
---|---|---|
children | node | A list of |
The
ref
is forwarded to the root element.Inheritance
While not explicitly documented above, the props of the Tabs component are also available in TabList. You can take advantage of this to target nested components.
These class names are useful for styling with CSS. They are applied to the component's slots when specific states are triggered.
Class name | Rule name | Description |
---|---|---|
.MuiTabList-centered | centered | Styles applied to the flex container element if centered={true} & !variant="scrollable" . |
.MuiTabList-fixed | fixed | Styles applied to the tablist element if !variant="scrollable" . |
.MuiTabList-flexContainer | flexContainer | Styles applied to the flex container element. |
.MuiTabList-flexContainerVertical | flexContainerVertical | Styles applied to the flex container element if orientation="vertical" . |
.MuiTabList-hideScrollbar | hideScrollbar | Styles applied to the tablist element if variant="scrollable" and visibleScrollbar={false} . |
.MuiTabList-indicator | indicator | Styles applied to the TabIndicator component. |
.MuiTabList-root | root | Styles applied to the root element. |
.MuiTabList-scrollableX | scrollableX | Styles applied to the tablist element if variant="scrollable" and orientation="horizontal" . |
.MuiTabList-scrollableY | scrollableY | Styles applied to the tablist element if variant="scrollable" and orientation="vertical" . |
.MuiTabList-scrollButtons | scrollButtons | Styles applied to the ScrollButtonComponent component. |
.MuiTabList-scrollButtonsHideMobile | scrollButtonsHideMobile | Styles applied to the ScrollButtonComponent component if allowScrollButtonsMobile={true} . |
.MuiTabList-scroller | scroller | Styles applied to the tablist element. |
.MuiTabList-vertical | vertical | Styles applied to the root element if orientation="vertical" . |
You can override the style of the component using one of these customization options:
- With a global class name.
- With a rule name as part of the component's
styleOverrides
property in a custom theme.