Badge

24.1

A Badge is a visual text label that displays the numeric values of an object.

Badge

24.1

A Badge is a visual text label that displays the numeric values of an object.

Badge

24.1

A Badge is a visual text label that displays the numeric values of an object.

Overview

A Badge is a visual text label that displays the numeric values of an object.

An example of a blue badge with the number 2 inside of it

Usage

Badges show the count of some adjacent data. They are usually placed after the label of the thing they're quantifying.

  • Use a badge only for numerical counts.

  • Use for counts of important information close to the relevant item.

  • Use to notify or draw attention to changed values.

Anatomy

  1. Label text: Display the numerical counts.

  2. Container: Hold the label counts and use color to categorize the information.

Variant & Props

Semantic Variants: When badges have a semantic meaning, they use semantic colors.

Examples of different backgrounds and styles for badges

Accessibility

  • Use an icon with these elements if color use conveys information such as error message, warning, or success message that the text doesn't convey. The icon is required so we do not use color as the sole means of conveying information.

  • Icon should have appropriate alt text to convey semantic meaning.

Help make this page more useful.

Help make this page more useful.

Help make this page more useful.