Tab API
Documentação da API para o componente React Tab . Aprenda sobre as propriedades disponíveis e a API CSS.
Importação
import Tab from '@mui/material/Tab';
// ou
import { Tab } from '@mui/material';Nome do componente
The nameMuiTab can be used when providing default props or style overrides in the theme.Propriedades
Propriedades do componente ButtonBase também estão disponíveis.
| Nome | Tipo | Padrão | Descrição |
|---|---|---|---|
| children | unsupportedProp | This prop isn't supported. Use the component prop if you need to change the children structure. | |
| classes | object | Sobrescreve ou extende os estilos aplicados para o componente. Veja a API CSS abaixo para maiores detalhes. | |
| disabled | bool | false | Se true, o componente está desabilitado. |
| disableFocusRipple | bool | false | If true, the keyboard focus ripple is disabled. |
| disableRipple | bool | false | If true, the ripple effect is disabled.⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure to highlight the element by applying separate styles with the focusVisibleClassName. |
| icon | element | string | The icon element. | |
| iconPosition | 'bottom' | 'end' | 'start' | 'top' | 'top' | The position of the icon relative to the label. |
| label | node | The label element. | |
| sx | Array<func | object | bool> | func | object | The system prop that allows defining system overrides as well as additional CSS styles. See the `sx` page for more details. | |
| 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. |
O
ref é encaminhado para o elemento raiz.Herança
Embora não explicitamente documentado acima, as propriedades do componente ButtonBase também estão disponíveis em Tab. Você pode tirar vantagem disso para manipular componentes aninhados.CSS
| Nome da regra | Classe global | Descrição |
|---|---|---|
| root | .MuiTab-root | Estilos aplicados ao elemento raiz. |
| labelIcon | .MuiTab-labelIcon | Estilos aplicados para o elemento raiz se both icon and label are provided. |
| textColorInherit | .MuiTab-textColorInherit | Estilos aplicados para o elemento raiz se the parent [Tabs](/api/tabs/) has textColor="inherit". |
| textColorPrimary | .MuiTab-textColorPrimary | Estilos aplicados para o elemento raiz se the parent [Tabs](/api/tabs/) has textColor="primary". |
| textColorSecondary | .MuiTab-textColorSecondary | Estilos aplicados para o elemento raiz se the parent [Tabs](/api/tabs/) has textColor="secondary". |
| selected | .Mui-selected | Pseudo-class aplicada a o elemento raiz se selected={true} (controlled by the Tabs component). |
| disabled | .Mui-disabled | Pseudo-class aplicada a o elemento raiz se disabled={true} (controlled by the Tabs component). |
| fullWidth | .MuiTab-fullWidth | Estilos aplicados para o elemento raiz se fullWidth={true} (controlled by the Tabs component). |
| wrapped | .MuiTab-wrapped | Estilos aplicados para o elemento raiz se wrapped={true}. |
| iconWrapper | .MuiTab-iconWrapper | Styles applied to the wrapper element of `icon` if icon is provided. |
Você pode sobrescrever o estilo do componente usando uma dessas opções de customização:
- Com um nome de classe global.
- Com um nome de regra como parte da propriedade
styleOverridesdo componente em um tema personalizado.