Component docs
Loading
import { Badge } from "@pixxl-tools/components";
// In Server Components:
import { Badge } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
size | ComponentSize | — | Size from the shared scale (xs, sm, md, lg). |
tone | Tone | — | Colour role (neutral, primary, danger, success, warning, info). |
variant | ComponentVariant | — | Emphasis (solid, secondary, soft, outline, ghost). |
sizeComponentSize
Size from the shared scale (xs, sm, md, lg).
toneTone
Colour role (neutral, primary, danger, success, warning, info).
variantComponentVariant
Emphasis (solid, secondary, soft, outline, ghost).
Other props are passed to the root element (HTMLAttributes<HTMLSpanElement>), including className, style, id and aria-* attributes.
Complex object props use fixed fixtures. Primitive props stay editable.
<Badge size="sm" tone="neutral" variant="soft">Badge</Badge><Badge>Beta</Badge><Badge size="sm" tone="neutral" variant="soft">Badge</Badge>