Back to gallery

Badge

Variants, colors and sizes in light and dark

Each panel sets its own theme scope, so the appearance control above does not change them. The two lower panels nest the opposite theme inside, and the nested badges follow the nearest scope.

Light theme

soft, secondary
Draft
Draft
Draft
soft, success
Live
Live
Live
soft, warning
Needs review
Needs review
Needs review
soft, danger
Failed
Failed
Failed
soft, info
Info
Info
Info
soft, discovery
New
New
New
solid, secondary
Draft
Draft
Draft
solid, success
Live
Live
Live
solid, warning
Needs review
Needs review
Needs review
solid, danger
Failed
Failed
Failed
solid, info
Info
Info
Info
solid, discovery
New
New
New
outline, secondary
Draft
Draft
Draft
outline, success
Live
Live
Live
outline, warning
Needs review
Needs review
Needs review
outline, danger
Failed
Failed
Failed
outline, info
Info
Info
Info
outline, discovery
New
New
New

Dark theme

soft, secondary
Draft
Draft
Draft
soft, success
Live
Live
Live
soft, warning
Needs review
Needs review
Needs review
soft, danger
Failed
Failed
Failed
soft, info
Info
Info
Info
soft, discovery
New
New
New
solid, secondary
Draft
Draft
Draft
solid, success
Live
Live
Live
solid, warning
Needs review
Needs review
Needs review
solid, danger
Failed
Failed
Failed
solid, info
Info
Info
Info
solid, discovery
New
New
New
outline, secondary
Draft
Draft
Draft
outline, success
Live
Live
Live
outline, warning
Needs review
Needs review
Needs review
outline, danger
Failed
Failed
Failed
outline, info
Info
Info
Info
outline, discovery
New
New
New

Dark theme, with a light panel inside

soft, secondary
Draft
Draft
Draft
soft, success
Live
Live
Live
soft, warning
Needs review
Needs review
Needs review
soft, danger
Failed
Failed
Failed
soft, info
Info
Info
Info
soft, discovery
New
New
New
solid, secondary
Draft
Draft
Draft
solid, success
Live
Live
Live
solid, warning
Needs review
Needs review
Needs review
solid, danger
Failed
Failed
Failed
solid, info
Info
Info
Info
solid, discovery
New
New
New
outline, secondary
Draft
Draft
Draft
outline, success
Live
Live
Live
outline, warning
Needs review
Needs review
Needs review
outline, danger
Failed
Failed
Failed
outline, info
Info
Info
Info
outline, discovery
New
New
New

Light theme, nested in dark

soft, secondary
Draft
Draft
Draft
soft, success
Live
Live
Live
soft, warning
Needs review
Needs review
Needs review
soft, danger
Failed
Failed
Failed
soft, info
Info
Info
Info
soft, discovery
New
New
New
solid, secondary
Draft
Draft
Draft
solid, success
Live
Live
Live
solid, warning
Needs review
Needs review
Needs review
solid, danger
Failed
Failed
Failed
solid, info
Info
Info
Info
solid, discovery
New
New
New
outline, secondary
Draft
Draft
Draft
outline, success
Live
Live
Live
outline, warning
Needs review
Needs review
Needs review
outline, danger
Failed
Failed
Failed
outline, info
Info
Info
Info
outline, discovery
New
New
New

Light theme, with a dark panel inside

soft, secondary
Draft
Draft
Draft
soft, success
Live
Live
Live
soft, warning
Needs review
Needs review
Needs review
soft, danger
Failed
Failed
Failed
soft, info
Info
Info
Info
soft, discovery
New
New
New
solid, secondary
Draft
Draft
Draft
solid, success
Live
Live
Live
solid, warning
Needs review
Needs review
Needs review
solid, danger
Failed
Failed
Failed
solid, info
Info
Info
Info
solid, discovery
New
New
New
outline, secondary
Draft
Draft
Draft
outline, success
Live
Live
Live
outline, warning
Needs review
Needs review
Needs review
outline, danger
Failed
Failed
Failed
outline, info
Info
Info
Info
outline, discovery
New
New
New

Dark theme, nested in light

soft, secondary
Draft
Draft
Draft
soft, success
Live
Live
Live
soft, warning
Needs review
Needs review
Needs review
soft, danger
Failed
Failed
Failed
soft, info
Info
Info
Info
soft, discovery
New
New
New
solid, secondary
Draft
Draft
Draft
solid, success
Live
Live
Live
solid, warning
Needs review
Needs review
Needs review
solid, danger
Failed
Failed
Failed
solid, info
Info
Info
Info
solid, discovery
New
New
New
outline, secondary
Draft
Draft
Draft
outline, success
Live
Live
Live
outline, warning
Needs review
Needs review
Needs review
outline, danger
Failed
Failed
Failed
outline, info
Info
Info
Info
outline, discovery
New
New
New

Pill

Pill is on by default. It rounds the ends fully and widens the side padding by 1.33. Turn it off with pill=false for the size radius.

sm
Pill default
Pill off
Pill default
Pill off
md
Pill default
Pill off
Pill default
Pill off
lg
Pill default
Pill off
Pill default
Pill off

Icons

An svg takes the size icon size, and the first or last svg sits 1px outside the padding unless it is the only child. data-ck-no-autosize keeps an svg at its own size.

sm
Live
Open
Both
Fixed 12px
md
Live
Open
Both
Fixed 12px
lg
Live
Open
Both
Fixed 12px
Nested
Override
--ck-pill-icon-offset: 4px
Live

Text children

Adjacent text and numbers merge into one string. A string with siblings is wrapped in a span, a lone string is not, and blank strings are left alone. The markup of each badge is shown beside it.

Draft
Version 2 beta
Draft
Nestedbold

Token overrides and indicator size

A badge reads its size, gutter, radius, tracking and icon tokens from the nearest ancestor that defines them. The first row sets the source's recommendation tokens (24px, 7px gutter, radius-sm, normal tracking). The second row sets a larger icon and radius. The dot in each row follows --progress-ring-size, which each size sets.

Recommended
Live
sm
md
lg
Explicit size

Semantics and extra props

The desktop badge drops extra props and defaults to a pill. The web badge forwards extra props and defaults to a non-pill shape.

Draft
Desktop default
Web default
Version 2
Overridden data
Desktop spacing
Web spacing

Clicks on the badge: 0

Changing props

The badge has no transition or animation, so a new variant, color or size shows at once, with no fade or resize in between. This holds with reduced motion on or off.

Draft
soft, secondary, sm

Right to left

The icon offset uses physical left and right margins, so the first svg keeps its 1px outward shift on the left in both directions.

جاهز
مفتوح
فشل