BadgeNew: New
Features
- Supports various statuses
- Can optionally display an icon next to the label
- Features a "loud" variant that stands out more
When to use
To highlight an item's category or attribute, use a Tag instead.
Examples
Variants
The component comes in different variants. Each variant is used to signal a different status.
Info
Use the info
variant to highlight something that's neither good or bad. This is similar to the neutral
variant. However, it should be used for active statuses (e.g., in progress, processing, etc.).
Neutral
Use the neutral
variant to highlight something that's neither good or bad. This is similar to the info
variant. However, it should be used for inactive statuses (e.g., archived, paused, draft, etc.).
Positive
Use the positive
variant to highlight something that's good, from the user's perspective, or something enabled (e.g., approved, active, on, enabled, etc.).
Negative
Use the negative
variant to highlight something that's bad, from the user's perspective.
Warning
Use the warning
variant to highlight something that requires the user's attention.
Discover
Use the discover
variant to highlight new features or functionality users might not be aware of.
Loud
Use the loud
prop when you need to make a badge stand out more. This variant is also intended for use on gray backgrounds.
Icons
An icon can be added next to the label. This can help users understand a badge's meaning. Icons can also make badges more recognisable and distinguishable. This is helpful in scenarios where multiple badges are used on a page or within a list.
Skeleton
Best practices
Accessibility
To satisfy WCAG 1.4.1 ("Color is not used as the only visual means of conveying information"), Badges have visually hidden prefixes applied before the content. These can be overridden using visuallyHiddenPrefix
.
Variant | Prefix |
---|---|
Info | Information: |
Neutral | Information: |
Positive | Success: |
Negative | Error: |
Warning | Warning: |
Discover | New: |