Pular para o conteúdo

Badge

Este conteúdo não está disponível em sua língua ainda.

The Badge component is a small visual indicator that can display status, counts, or labels.
It is commonly used alongside icons, buttons, avatars, or other UI elements to provide additional context.

  • Status indicators: Show online/offline or other states via colors.
  • Count badges: Display numeric or text counts.
  • Variants and sizes: Supports different styles (outlined, contained) and sizes (sm, md, lg).
  • Customizable: Rounded or square shapes, background and text colors.
successwarningerrorinfo outlinedcontained xssmmdlgxl
PropTypeDefaultDescription
variant"outlined" | "contained""outlined"Visual style of the badge.
sizestring"md"Size of the badge. Values from Constants.sizes (e.g., sm, md, lg).
classstring""Custom classes to modify background, text, or shape.
roundedFullbooleanfalseMakes the badge fully rounded.
  • Use color-coded badges for status indicators consistently across the UI.
  • Keep text concise for counts or labels.
  • Combine with icons, avatars, or buttons to provide context.
  • Prefer roundedFull for numeric badges to maintain a neat circular look.
  • Ensure sufficient contrast between background and text for accessibility.