Rime

StatusPill, Badge and CountBadge

Status pills (tinted fill, tinted edge, deep ink), small uppercase tags, and count badges.

StatusPill names a record's state in a list or header. Badge is a small uppercase tag (soft or solid) for categories and flags. CountBadge is a number of things waiting, capped at max (99+).

Tones: neutral, info, success, warning, danger and deep (the brand). Every tone's ink clears 4.5:1 on its own fill over worst-case glass.

Installation

npx shadcn@latest add KezLahd/rime/badge

Also installs: base.

Usage

import { Badge, CountBadge, StatusPill } from "@/components/ui";

<StatusPill tone="success">Paid</StatusPill>

Examples

Tones

DraftSentOverduePaidVoidNewPending4

shadcn badge variants

Badge accepts shadcn's variant names: default (solid accent), secondary (soft neutral), destructive (solid danger) and outline (a hairline, no fill). asChild renders a link with the badge's look.
NewDraftOverdueBetaChangelog

API

Generated from the component's TypeScript types and JSDoc (scripts/gen-ui-registry.mjs), so it always matches the source.

StatusPill

StatusPill props
PropTypeDefaultDescription
toneRequiredTone
childrenRequiredReactNode
dotbooleanLeading dot in the tone colour, for dense tables where the pill needs a second cue.
size"sm" | "md""md"
classNamestring
asChildbooleanRender the single child element (a link) with the pill's look.

Badge

Badge props
PropTypeDefaultDescription
toneTone"neutral"
variant"soft" | "solid" | "default" | "secondary" | "destructive" | "outline""soft"soft = tinted tag. solid = white text on the tone (counts needing attention). shadcn's names are accepted too: default (solid brand), secondary (soft neutral), destructive (solid danger), outline (a hairline tag with no fill).
childrenRequiredReactNode
classNamestring
asChildbooleanRender the single child element (a link) with the badge's look.

CountBadge

CountBadge props
PropTypeDefaultDescription
countRequirednumber
tone"brand" | "danger" | "warning" | "neutral""brand"
labelstringAccessible text, e.g. "3 pending requests". The number alone is ambiguous.
maxnumber99
classNamestring

Theme tokens

Per-component tokens are undeclared by default, so the default shown is the fallback the CSS uses. Set one at :root (or in theme.css) to restyle every instance. Live values are read from this page, so they follow the Rime Studio.

StatusPill, Badge and CountBadge per-component tokens
TokenDefaultLive value
--pill-font-size12px…
--pill-pad-xcalc(10px * var(--density))…
--pill-radiusvar(--r-full)…
--r-circle50%…
--tag-brand-bgvar(--brand-gradient)…
--tag-radiusvar(--r-2xs)…

System tokens it reads

StatusPill, Badge and CountBadge system tokens
TokenDefaultLive value
--border-wtokens.css…
--brand-filltokens.css…
--brand-gradienttokens.css…
--brand-inktokens.css…
--brand-linetokens.css…
--danger-filltokens.css…
--danger-inktokens.css…
--danger-linetokens.css…
--densitytokens.css…
--info-filltokens.css…
--info-inktokens.css…
--info-linetokens.css…
--ink-brandtokens.css…
--ink-inversetokens.css…
--ink-secondarytokens.css…
--neutral-filltokens.css…
--neutral-inktokens.css…
--neutral-linetokens.css…
--r-2xstokens.css…
--r-fulltokens.css…
--success-filltokens.css…
--success-inktokens.css…
--success-linetokens.css…
--success-solidtokens.css…
--warning-filltokens.css…
--warning-inktokens.css…
--warning-linetokens.css…
--warning-solidtokens.css…
--wash-strongtokens.css…

Accessibility

  • Colour is never the only signal: the label always says the state.
  • CountBadge takes a label for screen readers ("4 waiting").

Do and don't

Do

  • Map each status to one tone in one place and reuse it.

Don't

  • Don't make a pill clickable; it is a label.

For AI agents

This page as markdown, rendered from the same registry entry. Point an agent at it (or add .md to this page's URL), or at /llms.txt for the index.

Open status-pill.md