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
Preview
Section titled “Preview”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>Examples
Section titled “Examples”Default
Section titled “Default”A muted pill for labels and statuses.
count is a compact badge for unread counts and other small numbers.
Citation
Section titled “Citation”citation is a filled primary marker for inline citation references.
Styling
Section titled “Styling”Restyle the pill through its part — change the background, color, or shape; variant only sets the defaults.
| Part | Purpose | Example |
|---|---|---|
| badge | The badge pill. Restyle its background, color, or shape; the `variant` prop (default/count/citation) sets the defaults. | |
| Property | Type | Default | Notes |
|---|---|---|---|
| variant | "default" | "count" | "citation" | 'default' | `default` (muted pill) · `count` (compact number badge) · `citation` (filled primary, for inline citation markers). Defaults to `default`. |
Composed from
Section titled “Composed from”This element wraps these SolidJS components — reach for them directly when you need finer control than the props expose.