Skip to content

Official government website An official website of the Federal Government of Nigeria

How you know
Federal Ministry of Communications, Innovation & Digital Economy Nigerian Design Standards

Badge

A compact label that shows the status of an item, tags content with a category, or shows a count. People can remove a dismissible badge, like a filter they applied.

Updated

Live example

Badge
Approved
Controls
Property Control What it does
Standard, dismissible, numeric or icon
One or two words
Matches the meaning
Icon
Leading icon on standard badges

Overview

Use a badge to label an item with its status or category, to show a count, or to show a filter people can remove. The words carry the meaning, and the colour backs them up.

Use a badge for

  • A status or category, like “Approved” or “Pending review”
  • A count, like unread notifications
  • A filter people can remove (dismissible)

Don’t use a badge for

  • A sentence or message (use an alert, toast or banner)
  • An action (use a button or link)
  • Decoration, or a colour with no words

Types and variants

Type changes how the badge is built; variant changes the colour. Every type comes in neutral, info, success, warning and error.

Approved

Standard

A plain label. The words carry the meaning.

Lagos

Dismissible

A close button removes it. The only type people interact with.

unread notifications

Numeric

A number only. Say what is counted in nearby text.

Pending review

Icon

A leading icon adds shape as a second cue, for statuses people mustn’t miss.

Specifications

The properties of the badge. The same in HTML, WordPress and React.

Badge properties
Property Type Possible values Description
label string
  • any text
Required. One or two words, in sentence case.
type string
  • standard default
  • dismissible
  • numeric
Dismissible adds a remove button.
variant string
  • neutral default
  • info
  • success
  • warning
  • error
Same variant for the same status everywhere.
icon boolean
  • false default
  • true
Adds a 24px leading icon. Not on numeric badges.

In code, standard and numeric badges are a plain <span> and are not focusable. Dismissible adds a <button type="button"> with an aria-label that names what it removes, like aria-label="Remove Lagos filter". For numeric badges, include visually hidden text that says what is counted.

Tokens

Badge tokens and contrast
Part Token Contrast on the page
Container status/{variant}/bg · status/{variant}/border 1px · radius/050 4px · spacing/050 4px Border is decorative
Label Label/small · status/{variant}/surface 4.65:1 to 6.41:1
Neutral action/tertiary/default · text/secondary · action/tertiary/border 6.4:1
Close icon icon/Close Small, 16px in a 24px target, in the label colour 4.65:1 or more
Warning status/warning/bg · color/yellow/700 (primitive) 4.75:1
Leading icon icon/Info Small, 16px, in the label colour 4.75:1 on warning/bg

Use cases

Do

Approved

Use words that say the status, and the same variant for the same status everywhere.

Don’t

Click to submit your application

Don’t use a badge as a button or for a sentence. Use a button, link or alert.

Layout

How badges sit beside content and how much room they take.

24px tall
spacing/050 padding above and below the label. Icon types have no vertical padding.
8px between badges
Wrap onto the next line when they run out of room.
Beside what it describes
Never inside a sentence or inline string.
12px label
Label/small on every screen. Do not scale it down.
A few at most
More than a few in a row is noise. Use a table column instead.

Copywriting

How to write badge labels.

Say the status
“Pending review”, not just a colour.
One or two words
Anything longer belongs in a message.
Sentence case
“Pending review”, not “PENDING REVIEW”.
Same word, same status

Pick “Approved” or “Accepted”, not both.

Counts are numbers only

Say what is counted in nearby text.

Name what it removes

The remove button says “Remove Lagos filter”.

Examples

Badge copywriting examples
Write Don’t write Why
Pending review A colour with no words Say the status.
Approved PENDING REVIEW Sentence case.
Remove Lagos filter Remove Name what it removes.
3 3 unread Counts are numbers only.
Accepted Approved and Accepted for the same status Same word, same status.

Accessibility

Badges are mostly text. Only dismissible badges are interactive controls.

Keyboard interaction for dismissible badges
Key What it does
Tab Moves to the remove button on a dismissible badge. Standard and numeric badges aren’t focusable.
Shift + Tab Moves back.
Enter or Space Removes the badge. Focus moves to the next badge, or to the filter area if it was the last.
  • Standard and numeric badges are plain text, with no role (WCAG 1.3.1).
  • The remove button is labelled with what it removes, like “Remove Lagos filter” (WCAG 4.1.2, 2.4.6).
  • The label always says the status, so colour is never the only signal (WCAG 1.4.1).
  • Labels are 4.65:1 to 6.41:1 on their fills (WCAG 1.4.3).
  • The close icon sits in a 24px target, the minimum size (WCAG 2.5.8).

For developers

Copy the code for HTML, WordPress or React from the Code tab in Live example. The options are listed under Specifications.

For designers

Use Badge from 01 Library – Foundations. Pick the type and variant, and keep labels to one or two words.

References

Report a problem with this page