GitHub

Badge

Small status indicator with color variants, pill shape, and pulse animation.

<rhx-badge>

Examples

Variants

Neutral Brand Success Warning Danger

Pill Shape

12 New Active 3

Pulse Animation

3 Live Online

Properties

Property Type Default Description
rhx-variant string neutral Color variant: neutral, brand, success, warning, danger
rhx-pill bool false Renders with fully rounded corners
rhx-pulse bool false Adds a pulsing animation

Accessibility

  • Use aria-label when the badge content is not self-explanatory (e.g., a number without context).
  • Decorative badges that duplicate adjacent text should use aria-hidden="true".
  • Pulse animation is purely visual and does not affect screen reader output.
  • Color is supplemented by text content so meaning is not conveyed by color alone.