Skip to content
SENVENLI UI

Badge

A short label beside content: a record's status in a pill (subtle or bold), a live state as a dot and a word, or a count.
Invoice INV-2026-0318Paid
A record's status
import { Badge, BadgeAnchor } from "@senvenli/react/display";

Examples

Tones

One meaning per tone, across the whole product.

Bold

`variant="bold"` for the one status on the screen that needs attention now.

With a dot

A dot in the pill marks a live state.

Dot: a live state

`variant="dot"`: a dot and a word, for a system state (connected, syncing).

Dot and live

`isLive` adds a halo for a state that is active right now.

Dot without a word

Only where a visible word is impossible; `aria-label` names the state.

A count beside a label

`variant="count"`: nothing renders at zero; above `max` it reads "99+".

Count tones

Neutral by default; danger only for counts that need action now.

A count on an icon

The badge is hidden from screen readers, so the button's name carries the count.

Unread dot

`variant="count"` with no `value`: a marker without a number; the text beside it says what is new.
New comments on Project Atlas

A code: Beside a country's name

The code marks the country without a flag; the name beside it is what gets read.

A code: Standing alone

Without the name beside it, a wrapper gives the chip its accessible name.
Ships fromDE

Guidelines

When to use it

  • Showing the state of an item: draft, paid, overdue.
  • Showing how many items need attention.
  • Marking a country or language next to its name.

Use something else when

  • The labels can be removed or selected. Tag group
  • The label is a person or a company. Avatar

Do and avoid

  • The word carries the meaning, never the color alone; use sentence case.
  • Use the bold appearance sparingly, for the one status that matters most.
  • Use danger only for counts that need action now.

Accessibility

Built in

  • Text meets WCAG AA in both appearances.
  • Counts above max show as "max+".
  • On an icon the badge is hidden; the control's label must say the count.
  • Hidden from screen readers when the name is next to it.

You provide

  • A status word that makes sense without color.
  • The count in the control's accessible name when the badge sits on an icon.
  • The name beside it.

API reference

Badge

tone
Tone | BadgeCountTone

One meaning per tone: information (Approved, In progress) · brand (Featured) · success (Completed, Available, Paid) · warning (Payment pending, Under review) · danger (Canceled, Failed, Overdue) · neutral (Draft, Inactive).

variant
"bold" | "dot" | "subtle" | "count"

subtle (default): the status of a record in a pill. bold: the one status on the screen that needs attention now. dot: a dot and the word, for a live system state (online, syncing).

hasDot
boolean

A 6px dot inside a pill (subtle or bold), for live states. dot always has its dot.

radius
ComponentRadius

Pills only (subtle, bold): corner radius, none to full; the design's small step (or the provider's default) otherwise.

isLive
boolean

dot only: a 3px halo for a state that is active right now (connected, syncing).

children
React.ReactNode

The status word, sentence case ("Payment pending"); the word carries the meaning, never the colour.

aria-label
string

dot only, where a visible word is impossible (a dense table cell with its own column header).

value
number

The count; nothing renders at 0. Left out, an 8px unread marker without a number, hidden from screen readers, so the text or label next to it says "new".

max
number

Above it shows "max+"; default 99, or 9 on an icon.

BadgeAnchor

childrenRequired
React.ReactNode