Pular para o conteúdo

BottomNavigationAction API

Documentação da API para o componente React BottomNavigationAction . Aprenda sobre as propriedades disponíveis e a API CSS.

Demonstrações

For examples and details on the usage of this React component, visit the component demo pages:

Importação

import BottomNavigationAction from '@mui/material/BottomNavigationAction';
// ou
import { BottomNavigationAction } from '@mui/material';
Você pode aprender sobre a diferença lendo este guia sobre como minimizar o tamanho do pacote.

Nome do componente

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

Propriedades

Propriedades do componente ButtonBase também estão disponíveis.

NomeTipoPadrãoDescrição
childrenunsupportedProp
This prop isn't supported. Use the component prop if you need to change the children structure.
classesobject
Sobrescreve ou extende os estilos aplicados para o componente. Veja a API CSS abaixo para maiores detalhes.
iconnode
The icon element.
labelnode
The label element.
showLabelboolfalse
If true, the BottomNavigationAction will show its label. By default, only the selected BottomNavigationAction inside BottomNavigation will show its label.
The prop defaults to the value (false) inherited from the parent BottomNavigation component.
sxArray<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.
valueany
You can provide your own value. Otherwise, we fallback to the child position index.

O ref é encaminhado para o elemento raiz.

Herança

While not explicitly documented above, the props of the ButtonBase component are also available on BottomNavigationAction. You can take advantage of this to target nested components.

CSS

Nome da regraClasse globalDescrição
root.MuiBottomNavigationAction-rootEstilos aplicados ao elemento raiz.
selected.Mui-selectedPseudo-class aplicada a o elemento raiz se selected.
iconOnly.MuiBottomNavigationAction-iconOnlyPseudo-class aplicada a o elemento raiz se showLabel={false} and not selected.
label.MuiBottomNavigationAction-labelEstilos aplicados a the label's span element.

Você pode sobrescrever o estilo do componente usando uma dessas opções de customização: