Skip to main content
PimentCSS v1.0.1, what's new
Home

Badges

Dot badges, counts, and status labels on inline content.

Styles live in scss/components/_badge.scss. Badges are compact status markers: a copy counter (24×24px) or a dot indicator (8×8px). Combine type and semantic modifiers (badge--information, badge--error, etc.).

Type Copy

Circular counter with Body/Small semi-bold typography. The visible number is the accessible name; keep counts short (for example 9+ for large values).

99
Default
99
Information
99
Warning
99
Error
99
Success

Type Dot

8×8px status dot with no visible text. Always expose meaning with aria-label (or aria-labelledby) and role="img".

Default
Information
Warning
Error
Success

In context

Place a copy badge beside a control label, or a dot badge next to status text so sighted users and assistive tech get the same meaning.

Status

Class reference

ClassDescription
.badgeBase inline-flex pill
.badge--copy24×24px numeric counter
.badge--dot8×8px indicator (no text)
.badge--defaultPrimary / neutral emphasis
.badge--informationInformational status
.badge--warningWarning status
.badge--errorError or alert count
.badge--successSuccess or positive status

Customize (Sass)

  1. Badge sizes

    Adjust copy and dot dimensions when your density scale changes.
    @use "pimentcss-design-system" with (
      $badge-copy-size: 1.5rem,
      $badge-dot-size: 0.5rem
    );
  2. Rebuild CSS

    Run after editing _badge.scss.
    npm run build:css

Accessibility (RGAA / WCAG)

Badges

  • Copy badges, rely on visible text; avoid icon-only triggers that only show a number unless the control has an accessible name that includes the count.
  • Dot badges, use role="img" and a concise aria-label (for example “3 unread messages”, not just “Error”).
  • Color, do not use color alone: pair dots with visible text nearby or expose the status in the parent element’s label.
  • Motion, when counts change, consider a polite aria-live region on the parent widget, not on the badge itself.

Next steps