Skip to contentWolf-Rayet

Badge

A badge is a visual indicator for numeric values such as tallies and scores.

When to use

  • A count that belongs to something else on screen, such as unread items beside an inbox or results beside a filter.
  • A tally that changes while the page is open and that someone will want to glance at rather than read.

When not to use

  • A status or a category. That is a lozenge, which carries a word rather than a number.
  • A label on an object. That is a tag.
  • A number that is the content rather than an annotation of it. Write that as text, where it can be read and copied.
  • A count nobody will act on. A badge draws the eye, so an idle number spends attention for nothing.

Guidance

Do

150

Cap a count that can run away. Past a point the exact number stops meaning anything and only the width changes.

Don't

150387

Do not let a badge grow without a ceiling. It pushes whatever sits beside it and nobody reads six digits at this size.

Intensity

What each of this component's grounds spends, measured against the ladder in both themes.

AppearanceGroundLightDark
badgeaccent-gray-subtler0.099Ambient0.236Marked
badge--addedaccent-lime-subtler0.081Ambient0.175Ambient
badge--defaultaccent-gray-subtler0.099Ambient0.236Marked
badge--importantaccent-orange-subtler0.076Ambient0.188Ambient
badge--primaryaccent-blue-subtler0.095Ambient0.110Ambient
badge--primary-invertedsurface0.000Substrate0.000Substrate
badge--removedaccent-red-subtler0.092Ambient0.124Ambient

Substrate, Ambient and Marked are measured. Directed depends on what else is in the region, and Demanded is declared and rationed, so neither is a property this component carries by itself. See intensity.

Content

What to write, and what to leave out.

  • Numbers only, or a number with a symbol such as a plus. A badge is too small for a word.
  • Do not write zero. If there is nothing to count, leave the badge out.
  • The thing being counted is named by what the badge sits beside, so do not repeat it.