Components · Status

Badge Basic

A basic badge is a read-only status or label. It is never clickable.

How to add it to a page. The file is components/css/badge.css.

Basic Usage

Link the shared file once per page. Never copy the rules.

StepWhat to do
1. Link<link rel="stylesheet" href="/components/css/badge.css">. Both templates already have it.
2. ChooseClass badge-basic + a state + an emphasis. Add a size or upper case when you need it.
3. Keep it a spanA badge is a <span>, never a link or a button.

Badge


API

Classes

ClassUse
badge-basicThe badge. Medium by default.
badge-basic--neutral-grey, --neutral-dark, --info, --success, --warning, --dangerState. One per badge.
badge-basic--strong, --weak, --weakerEmphasis. One per badge.
badge-basic--large, --smallSize. Medium is the default.
badge-basic--uppercaseUpper case, weight 600.
badge-basic__iconThe icon (Material Symbols name as text, aria-hidden="true"), 14px.

Things to know

  • Not the header counter: .badge is a different component.
  • Small is as big as Medium below 769px.
  • Alert warning has black text at every emphasis.

CSS / Tailwind

The component is one CSS file, shared by every page. Link it, never copy it.

CSS (components/css/badge.css)