Component
Badge
Published on
Description
The Badge component displays a small label, typically used to show a count, status, or short descriptor. Badges are rendered as inline <span> elements with the .badge class.
Use badges to highlight notification counts, item quantities, or status indicators. Avoid using badges for long text; use a Tag or Alert instead.
Example
Accessibility
- Badges are rendered as
<span>elements with no implicit ARIA role. - Screen readers will read the badge text inline with surrounding content.
- For dynamic counts, consider wrapping the badge in an
aria-liveregion so updates are announced.
References
- Live Region Support (opens in new tab) — Adrian Roselli
Related
Variables
None