ComponentsDisplay
Badge
A short label for status or counts. Never color alone.
A short label for status or counts. Never color alone.
<Badge color="success" hasDot>Paid</Badge>The same component at all four levels. Pick the one that fits your project; they share tokens, so they mix.
npm i junco @junco/tailwindimport { Badge } from "junco";
<Badge color="success" hasDot>Paid</Badge>
<Badge variant="outline" color="danger" hasDot>Failed</Badge>Outline badges use status text tokens that pass 4.5:1 on the page. The dot plus the word carry the meaning, not the color.
Badge#variantcolorhasDot| Prop | Type | Default |
|---|---|---|
variantFilled or outlined. | "solid" | "outline" | "solid" |
colorMeaning. Always pair it with words. | "neutral" | "primary" | "success" | "warning" | "danger" | "neutral" |
hasDotAdds a leading dot in the current color. | boolean | false |