Badges
Badges are used to classify content using keywords and statuses. Use badges on a screen, asset, or other content to help users search for and find related content or understand statuses.
Best practices
- Always be consistent and use labels that are as short as possible while conveying meaning.
- Use the colour system to help give badges meaning.
- Badge labels should always be written in sentence case.
Do: Use sentence case
Don't: Use title case or all caps
How it works
Badges scale to match the size of the immediate parent element by using relative font sizing and em
units.
Example heading New
Example heading New
Example heading New
Contextual variations
Add any of the below mentioned modifier classes to change the appearance of a badge. Use the status colours when communicating a status to users.
Primary Secondary Teal Purple Success Danger Warning Info Light Dark
Conveying meaning to assistive technologies
Using colour to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the colour is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .sr-only
class.
Links
Using the contextual .badge-*
classes on an <a>
element quickly provide actionable badges with hover and focus states.
Primary Secondary Teal Purple Success Danger Warning Info Light Dark