Pular para o conteúdo

BadgeUnstyled API

Documentação da API para o componente React BadgeUnstyled . 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 BadgeUnstyled from '@mui/base/BadgeUnstyled';
// ou
import { BadgeUnstyled } from '@mui/base';
Você pode aprender sobre a diferença lendo este guia sobre como minimizar o tamanho do pacote.

Propriedades

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

NomeTipoPadrãoDescrição
badgeContentnode
The content rendered within the badge.
childrennode
The badge will be added relative to this node.
componentelementType
The component used for the root node. Either a string to use a HTML element or a component.
invisibleboolfalse
If true, the badge is invisible.
maxnumber99
Max count to show.
showZeroboolfalse
Controls whether the badge is hidden when badgeContent is zero.
slotProps{ badge?: func
| object, root?: func
| object }
{}
slots{ badge?: elementType, root?: elementType }{}

O ref é encaminhado para o elemento raiz.