Badge

Variants

The default is neutral. Use outline for labels that are not a status, such as a customer type.

Draft Wholesale Processing Paid Pending Refunded

Sizes: default and lg

Fulfilled Fulfilled

With an icon

The icon sits before the text and uses the same colour.

Unfulfilled Fulfilled On hold Cancelled Wholesale

Large with an icon, as a fulfillment card heading

A data-size="lg" badge replaces the heading of a card grouped by status.

Magic Sheets bed sheet, Blue / Twin × 2

Fulfilled

Magic Sheets bed sheet, Blue / King × 1

Beside a page title, inside the h1

Put the badge inside the <h1>, after the title. The badge keeps its own font size.

Removable

Add a <button> at the end of the badge, with an aria-label. The page removes the badge on click (this example uses a short inline script).

Gift card: Yes Category: Furniture

Attributes

Attribute / element Values Description
.badge Inline label, 20px tall, 12px text, neutral fill.
data-variant outline, ok, warning, info, danger (omit for neutral) outline has a 1px border and no fill, for labels that are not a status. The rest are status colours.
data-size lg (omit for the default 20px) lg is 28px tall with 14px text. Use it as a card heading.
> .icon Icon before the text, sized to the text.
> button Remove button at the end of the badge. Set type="button" and an aria-label, with an .icon-x inside. The page removes the badge.
h1 > .badge, h2 > .badge, h3 > .badge In a heading, the badge sits 8px from the title and is centred on the line.