Badges
Badges are used to provide extra non critical information to the user. They can be used to indicate the number of items, the state of a task, or the importance of an action. Badges can be used inside other blocks.
Design Hints
Accessibility Hints
Simple Badge
A set of simple multipurpose badges.
Alternate Simple Badge
An alternate style for simple badges with outlines.
Badge With Icon
An alternate style for simple badges with outlines.
Badge With Other Elements
Here are some examples of using badges with other elements.
Accessibility Note: The last variant uses a motion-safe:animate-ping
class to create the pinging animation with motion-safe being a selector and animate-ping being a standard tailwind class. You can also use the prefers-reduced-motion
media query to disable the animation if the user has reduced motion enabled. For more information about accessible animations, see this article from W3C about pause, stop and hide animations
Accessibility Testing Status
Component | NVDA | Windows Narrator | WAVE | Axe | IBM Equal Access |
---|---|---|---|---|---|
Simple Badge | Yes | Yes | Yes | Yes | Yes |
Alternate Simple Badge | Yes | Yes | Yes | Yes | Yes |
Badge With Icon | Yes | Yes | Yes | Yes | Yes |
Badge With Other Elements | Yes | Yes | Yes | Yes | Yes |
There are no clear accessibility guidelines for the badge pattern described by WAI-ARIA, so ravixUI implements basic accessbility patterns applicable to all elements.