Skip to content

Search

Start typing to search.


Show all pages

Documentation

feedback

Badge

A short label for a status or category, such as Paid or Overdue.

CSS onlyPlain classes; no JavaScript in any stack.

Usage

A badge needs the component class and one variant.

Draft
HTML

Examples

Variants

Pick the variant by meaning, not by color. Neutral fits most labels; save danger for things that need action.

Draft New Paid Due soon Overdue Scheduled
HTML

In context

Place a badge next to the thing it describes, so the relation is clear without color.

Invoice 2026-114 Overdue

HTML

Guidance and accessibility

When to use

  • Use a badge for a status or category that people scan, such as the state of an invoice in a table.
  • Keep the label to one or two words.
  • Do not use a badge as a button. If it does something, use a button.

Accessibility

  • The text carries the meaning; color only supports it. “Overdue” must read as overdue in grayscale too.
  • A badge is plain text for screen readers. If the status changes while the page is open, announce the change elsewhere, for example with role="status".

Classes

Generated from the component contract. Parts use __, modifiers use --.

Classes of the badge component
ClassKindUse it for
ca-badgeComponentInline label that never wraps.
ca-badge--neutralVariantPlain labels such as Draft.
ca-badge--primaryVariantHighlights something new.
ca-badge--successVariantSomething finished well, such as Paid.
ca-badge--warningVariantNeeds attention soon, such as Due soon.
ca-badge--dangerVariantNeeds action now, such as Overdue.
ca-badge--infoVariantNeutral information, such as Scheduled.

Skins

The same markup, dressed by each skin. Structure and behavior stay the same; only the look changes.

Base skin

Neutral grayscale starting point; product skins extend it and change what differs.

Draft

Calaca skin

The Calaca UI brand: hueso paper and tinta ink, cempasúchil marigold, rosa and jade.

Draft

Proof skin

Pilot skin pushed far from base: square, heavy, offset shadows, larger targets.

Draft

Crossview skin

The CrossView proofing table: cool ground, bond-paper sheets, rule-grey hairlines, one red mark.

Draft

Framework notes

Link the prebuilt stylesheet of your skin next to your brand theme. No build step.

HTML
<link rel="stylesheet" href="theme.css" />
<link rel="stylesheet" href="ca-base.css" />