Skip to content
kitn AI/UI

Badge

kai-badge

A small pill for labels, statuses, counts, and inline citation markers. Put the content as light-DOM text; variant picks the look.

  • Shadow DOM
  • 3 variants
  • Light-DOM content
  • 1 part

Put the label or number as light-DOM text inside the element, then set variant to pick the look — a muted pill, a compact count, or a filled citation marker. The badge sizes to its content; place it wherever it belongs in your layout.

<kai-badge>Beta</kai-badge>
<kai-badge variant="count">3</kai-badge>
<kai-badge variant="citation">1</kai-badge>

A muted pill for labels and statuses.

count is a compact badge for unread counts and other small numbers.

citation is a filled primary marker for inline citation references.

Restyle the pill through its part — change the background, color, or shape; variant only sets the defaults.

PartPurposeExample
The badge pill. Restyle its background, color, or shape; the `variant` prop (default/count/citation) sets the defaults.
kai-badge::part(badge) { background: var(--color-primary); color: var(--color-primary-foreground) }
PropertyTypeDefaultNotes
variant'default'`default` (muted pill) · `count` (compact number badge) · `citation` (filled primary, for inline citation markers). Defaults to `default`.

This element wraps these SolidJS components — reach for them directly when you need finer control than the props expose.

Badge