Badge
Small label: NEW!, a count, a status word
An upright plate like every other label: it is never attended to, so it never leans. Ink by default: color means chosen, and a NEW! marker is not a choice. danger, warning, success and info are for status. badge and accent follow the palette and are for something chosen. Fills carry white text (on-light on warning and success). It marks a thing: new, on sale, paid, episode 12. It is not interactive and never removable (that is Chip) and it does not sit on a corner of something else: that is Indicator.
scaled shrinks it to 0.8, the way the NEW! of the source site sat beside a nav item. BlessSidebarNav and BlessListItem use it. Everything else must not use it. variant="outline" is the quiet version: border and text in the color, no fill. Use it for role and category tags that label rather than shout. Warning and success outlines take a muted border, because their fills are too pale to draw a line.
Usage
import { BlessBadge } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
color | "text" | "accent" | "danger" | "warning" | "success" | "info" | "badge" | "text" | |
scaled | boolean | false | shrink to 0.8 — the source's NEW! next to a nav item; off by default |
variant | "solid" | "outline" | "solid" | outline: 1px border and text in the colour, no fill — quiet category/role tags |
Slots
| Name | Scope | Description |
|---|---|---|
default | — |