Skip to content

Tabs API

API documentation for the React Tabs component. Learn about the available props and the CSS API.


import Tabs from '@mui/material/Tabs';
// or
import { Tabs } from '@mui/material';
You can learn about the difference by reading this guide on minimizing bundle size.

Component name

The name MuiTabs can be used when providing default props or style overrides in the theme.


Props of the native component are also available.

Callback fired when the component mounts. This is useful when you want to trigger an action programmatically. It supports two actions: updateIndicator() and updateScrollButtons()
If true, the scroll buttons aren't forced hidden on mobile. By default the scroll buttons are hidden on mobile and takes precedence over scrollButtons.
The label for the Tabs as a string.
An id or list of ids separated by a space that label the Tabs.
If true, the tabs are centered. This prop is intended for large views.
The content of the component.
Override or extend the styles applied to the component. See CSS API below for more details.
The component used for the root node. Either a string to use a HTML element or a component.
| 'secondary'
Determines the color of the indicator.
Callback fired when the value changes.

function(event: React.SyntheticEvent, value: any) => void
event: The event source of the callback. Warning: This is a generic event not a change event.
value: We default to the index of the child (number)
| 'vertical'
The component orientation (layout flow direction).
The component used to render the scroll buttons.
| false
| true
Determine behavior of scroll buttons when tabs are set to scroll:
- auto will only present them when not all the items are visible. - true will always present them. - false will never present them.
By default the scroll buttons are hidden on mobile. This behavior can be disabled with allowScrollButtonsMobile.
If true the selected tab changes on focus. Otherwise it only changes on activation.
| object
The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details.
Props applied to the tab indicator element.
Props applied to the TabScrollButton element.
| 'primary'
| 'secondary'
Determines the color of the Tab.
The value of the currently selected Tab. If you don't want any selected Tab, you can set this prop to false.
| 'scrollable'
| 'standard'
Determines additional display behavior of the tabs:
- scrollable will invoke scrolling properties and allow for horizontally scrolling (or swiping) of the tab bar. -fullWidth will make the tabs grow to use all the available space, which should be used for small views, like on mobile. - standard will render the default state.
If true, the scrollbar is visible. It can be useful when displaying a long vertical list of tabs.

The ref is forwarded to the root element.


Rule nameGlobal classDescription
root.MuiTabs-rootStyles applied to the root element.
vertical.MuiTabs-verticalStyles applied to the root element if orientation="vertical".
flexContainer.MuiTabs-flexContainerStyles applied to the flex container element.
flexContainerVertical.MuiTabs-flexContainerVerticalStyles applied to the flex container element if orientation="vertical".
centered.MuiTabs-centeredStyles applied to the flex container element if centered={true} & !variant="scrollable".
scroller.MuiTabs-scrollerStyles applied to the tablist element.
fixed.MuiTabs-fixedStyles applied to the tablist element if !variant="scrollable".
scrollableX.MuiTabs-scrollableXStyles applied to the tablist element if variant="scrollable" and orientation="horizontal".
scrollableY.MuiTabs-scrollableYStyles applied to the tablist element if variant="scrollable" and orientation="vertical".
hideScrollbar.MuiTabs-hideScrollbarStyles applied to the tablist element if variant="scrollable" and visibleScrollbar={false}.
scrollButtons.MuiTabs-scrollButtonsStyles applied to the ScrollButtonComponent component.
scrollButtonsHideMobile.MuiTabs-scrollButtonsHideMobileStyles applied to the ScrollButtonComponent component if allowScrollButtonsMobile={true}.
indicator.MuiTabs-indicatorStyles applied to the TabIndicator component.

You can override the style of the component using one of these customization options: