ink-ui

🏷️ Badge

Inline [label] tag with semantic colour variants.

<Badge> renders an inline [label] tag coloured by a semantic variant. It composes naturally alongside other inline elements, so you can place several badges side by side.

import { Badge } from "@kud/ink-ui";
import type { BadgeVariant } from "@kud/ink-ui";

πŸ”§ Props

PropTypeDefaultDescription
childrenstringβ€”Label text displayed inside brackets
variantBadgeVariant"info"Colour variant (see table below)

🎨 Variants

BadgeVariant is one of:

VariantColourToken
successgreencolors.success
errorredcolors.error
warningyellowcolors.warning
infocyancolors.info

πŸ’‘ Examples

<Badge variant="success">installed</Badge>
<Badge variant="warning">outdated</Badge>
<Badge variant="error">failed</Badge>
<Badge>queued</Badge>