Skip to content
Tab

Tab API

The API documentation of the Tab React component. Learn more about the properties and the CSS customization points.

import Tab from '@material-ui/core/Tab';

Props

Name Type Default Description
children unsupportedProp This property isn't supported. Use the component property if you need to change the children structure.
classes object Override or extend the styles applied to the component. See CSS API below for more details.
disabled bool false If true, the tab will be disabled.
disableFocusRipple bool false If true, the keyboard focus ripple will be disabled. disableRipple must also be true.
disableRipple bool If true, the ripple effect will be disabled.
icon node The icon element.
label node The label element.
value any You can provide your own value. Otherwise, we fallback to the child position index.
wrapped bool false Tab labels appear in a single row. They can use a second line if needed.

The ref is forwarded to the root element.

Any other properties supplied will be provided to the root element (ButtonBase).

CSS

You can override all the class names injected by Material-UI thanks to the classes property. This property accepts the following keys:

Name Description
root Styles applied to the root element.
labelIcon Styles applied to the root element if both icon and label are provided.
textColorInherit Styles applied to the root element if the parent Tabs has textColor="inherit".
textColorPrimary Styles applied to the root element if the parent Tabs has textColor="primary".
textColorSecondary Styles applied to the root element if the parent Tabs has textColor="secondary".
selected Styles applied to the root element if selected={true} (controlled by the Tabs component).
disabled Styles applied to the root element if disabled={true} (controlled by the Tabs component).
fullWidth Styles applied to the root element if fullWidth={true} (controlled by the Tabs component).
wrapped Styles applied to the root element if wrapped={true}.
wrapper Styles applied to the icon and label's wrapper element.

Have a look at the overriding styles with classes section and the implementation of the component for more detail.

If using the overrides key of the theme, you need to use the following style sheet name: MuiTab.

Inheritance

The properties of the ButtonBase component are also available. You can take advantage of this behavior to target nested components.

Notes

The component can cause issues in StrictMode.

Demos