Badge

A short label that isn't a control, such as a status or a count.

Installation

Examples

Default

It renders on the server.

demo.tsx
Kyoto in autumn DraftComments 3

Variants

default is a soft fill, accent marks what is new, and outline draws a line instead.

variants.tsx
DraftNewPublic

States

outline draws its line in the text's color, so text-success makes a green one.

states.tsx
SyncedExpiringFailed

Sizes

default keeps a one-digit count round, sm is a count beside a label, a step smaller than its text, and xs a count in a short row, such as a tree's. Text centers by its capitals, so a count sits in the middle.

sizes.tsx
Comments 3Photos 860Albums 12

Anatomy

Each part's data-slot, which a theme styles, is beside it.