Spectra v0.1

Components / badge

Priority 2

Badge

Back to docs

Badges are tiny inline status markers. In v0.1 the public contract is intentionally small: a base badge shell plus the soft surface variant.

Badge API

ClassUsed forNotes
.sp-badgeBase inline badge shellProvides sizing, inline layout, radius, and text weight. Leaves surface treatment to variants.
.sp-badge--softDefault surfaced badgeAdds --sp-elev background, text color, and --sp-border-1.

Preview

Base shell

Draft New

Use the base class when your app or a variant supplies the surface treatment.

Soft badge

Stable v0.1 Docs

Good for version chips, subtle state tags, and docs metadata.

Typical markup

<span class="sp-badge sp-badge--soft">Stable</span>

Guidance

Keep badges short. If the content starts reading like a button, switch to a button or chip pattern instead of overloading the badge.