Skip to content

Badge

Props ​

NameTypeDefaultDescription
variantBadgeVariant'neutral'Sets the visual variant of the badge. Optional: neutral, info, success, warning, error, blue, cyan, green, orange, pink, purple, red, teal, yellow.

Slots ​

NameDescription
defaultText content displayed by the badge.
iconOptional leading icon. An icon should not replace the text label.

Native attributes ​

The root element is <span>.

The root element receives:

  • HTML attributes.
  • aria-* attributes.
  • data-* attributes.
  • class.
  • style.
  • Native event listeners.

Badge is a read-only indicator. Do not add interactive behavior.