Badge
Badges can be used to highlight important bits of information such as labels, notifications & status.
Example
Wrapper Badge
H1 Header Dark
H2 Header Dark
H3 Header Dark
H4 Header Dark
Paragraph Dev
Default Badge
Button Badge
Anatomy
- Icon (situational): Serves to give more context to the badge. E.g avatar, logo, or icon.
- Container: Takes on the length of the text and/or icons within the badge.
- Text: Text can be an entity name, description, tag, action, or conversational. Length of the text is expandable
Spacing
Within the badge
Ensure that there is a min of 4px vertical spacing and 8px horizontal spacing within the badge
and 6px spacing between icons and text. Base height 24px.
Usage guidelines
Best practices:
- Use badges in conjunction with an icon or tooltip, to avoid ambiguity and enhance user understanding.
- Do not mix different sizes of badges within the same content.
Badges should be used when:
- You want to give a status update on a piece of information or action.
- You want to highlight something.
Badges should not be used when:
- Users are likely to confuse a badge with a small button, badges should not be clickable especially when they appear in the same area of the page as buttons.
- Detailed information need to be conveyed.
Usability guidelines
Avoid long sentences
Minimize badge text length to one- to three-words. Content should be clear and concise, and easy to identify.
Users may confuse badges as buttons
Avoid triggering interaction with a badge as they may be confused as small buttons.
Badges should include tooltips, where necessary, to enhance user understanding
For example, a badge is used in conjunction with an icon.
Accessibility guidelines
Keyboard accessibility
- Informational badges are not in the tab order, are not interactive, and do not receive focus.
Focus indicator
- Ensure that focus is on the close icon for dismissible badges.
Badge design tokens
Last updated 02 October 2024