Zazz Design Framework
Primitives

Badge

Compact label for status, category, or count. Same variant set as button.

A badge is a small label attached to a piece of content. Use one when you need to call attention to category, status, count, or a tag value without the weight of a button.

Badges share the button's variant vocabulary so the two compose visually. A primary badge on a primary button reads as a coherent system rather than two separate decisions.

Variants

Variant classUse forshadcn equivalent
badgeDefault outlined treatment.badge (outline)
badge-primary"New," "Beta," "Live." Calls attention.badge-primary (default)
badge-muted"Draft," "Archived." Soft, present-but-quiet.badge-secondary
badge-ghostInline metadata where a chip is too loud.badge-ghost
badge-linkA badge that's also a link (<a> element).n/a
CategoryNewDraftInlinePosts

Icon-only

The badge-minimal modifier makes a square icon-only badge. Useful for dots, status indicators, or kebab-menu triggers.

Anatomy

<span class="badge">
  <span class="badge-icon"><!-- optional leading icon --></span>
  <span class="badge-label">Label</span>
  <span class="badge-icon"><!-- optional trailing icon --></span>
</span>
PartClassNotes
RootbadgeA <span>, <a>, or <button> element. Required.
Variantbadge-primary, badge-muted, badge-ghost, badge-linkOptional. Apply at most one.
Modifierbadge-minimalSquare icon-only treatment.
Iconbadge-iconOne or two, leading and trailing as needed.
Labelbadge-labelThe visible text. Uses --font-size-xs for compactness.

Tokens

PropertyToken / value
Height--step-6
Padding (inline)--step-2
Gap--step-1_5
Border1px solid var(--border) (default), variant-dependent elsewhere
Radius--radius-badge (defaults to --radius-full, capsule)
Background (default)transparent
Background (primary)--primary → text --primary-foreground
Background (muted)--muted with --faded border → text --foreground
Background (ghost)transparent → hover paints --muted
Background (link)transparent → hover sets text to --primary
Font (root)family --font-body, size --font-size-sm, weight --weight-body, line-height 1
Font (label)size --font-size-xs
Hover--muted background on default; opacity drop on primary and muted
Activeopacity: 0.8 (link also adds text-decoration: underline)
Focus-visiblebox-shadow: var(--focus-ring) (apply via the ring utility class)

Override --radius-badge to swap the default capsule shape for square chips (--radius-sm) or matched-to-button corners (--radius-md). See Foundations → Radius.

States

Static badges don't carry interactive states. Clickable badges (root is <a> or <button>, often with badge-link) inherit the same hover, active, and focus-visible behavior as button.

Accessibility

  • Static badges (decorative labels) don't need ARIA. Use plain <span>.
  • Clickable badges should be <a> (navigation) or <button> (action). Apply badge-link for the visual treatment.
  • A badge that conveys live status (e.g., "Live now") should sit inside a region with aria-live="polite" if it changes dynamically.
  • Color alone shouldn't carry meaning. Pair color with an icon or label for success/warning/error badges.
  • For badge-minimal, set aria-label on the root.

Cross-platform

PlatformReference
FigmaZazz v0.4.4 → badge (component_set)
Webflowbadge class with badge-{variant} modifier
CSS / TailwindThe same classes after installing utilities.css

Where to next

On this page