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>

On this page