benjaminpalko/.opencode/skills/daisyui/components/badge.md
2026-08-11 16:25:07 -04:00

715 B

badge

Badges are used to inform the user of the status of specific data

badge docs

Class names

  • component: badge
  • style: badge-outline, badge-dash, badge-soft, badge-ghost
  • color: badge-neutral, badge-primary, badge-secondary, badge-accent, badge-info, badge-success, badge-warning, badge-error
  • size: badge-xs, badge-sm, badge-md, badge-lg, badge-xl

Syntax

<span class="badge {MODIFIER}">Badge</span>

Rules

  • {MODIFIER} is optional and can have one of each style/color/size class names
  • Can be used inside text or buttons
  • To create an empty badge, just remove the text between the span tags