Badge

Data display

A short label for a status, a category or a count: <Badge> with a variant colour (primary, secondary, neutral, outline, or a status: info, success, warning, error). An icon before the text is sized for it. With the child snippet it renders a link or another element.

import { Badge } from '@limerdev/zest';
Badge for AI tools (llms.txt)
Use for
An invoice's status in a table row, a role beside a name, a count beside a tab.
Don't
Something to click that does an action: use Button (size="sm"). A long message: use Alert. Colour alone for meaning: the text must say it.

Examples

Variants

The variants: primary by default, the other theme colours and the statuses.

New Secondary Neutral Draft Sent Paid Due soon Overdue

Props

Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that renders your own element, with props to spread on it).

Badge

Prop Type Default Description
variant "primary" | "secondary" | "neutral" | "error" | "outline" | "info" | "success" | "warning" 'primary' The colour: primary, secondary, neutral, outline, or a status (info, success, warning, error).