Skip to content

Badge

A 22px status mark at the 6px radius, with tone variants.

The status tones have set meanings: neutral for to do, draft or closed, info for in progress or issued, warning for in review or due, positive for done or paid, negative for overdue or failed. Each adds a dot, so the state never rests on colour alone.

Variants

NewBetaInternalArchivedBlocked4 comments

Status tones

DraftIn progressIn reviewPaidOverdue

With icon

v4.2.0release/4.2Changelog

Installation

npx shadcn@latest add @khaeli/badge

Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.

Installs with

Registry items
npm packages
  • @base-ui/react ^1.7.0
  • class-variance-authority ^0.7.1

Keyboard

Tab
A badge is text and takes no focus. Rendered as a link with render={<a href="…" />}, it is a tab stop with the focus ring.
Enter
Follows a badge that is rendered as a link.

Accessible name

  • A badge is read as its text, so the text must carry the state by itself: Overdue, not a bare red mark.
  • An icon beside the text is decorative and needs no name.
  • Rendered as a link, the badge is a link named by its text. The link variant only looks like one: give it a real href through render.

Registry JSON

The item as the shadcn CLI reads it, with every file it ships: https://ui.khaeli.com/r/badge.json