Badge
Badge labels a status, category, or count with short text so users can scan quickly without mistaking it for a primary action.
Usage
Include CSS
Import Tailwind and one full A3S UI style bundle.
Or import only the base CSS, Badge component CSS, and one style pack.
Using CDN or bundler imports? See the Installation page.
Add your badge HTML
Add class="badge" to an inline element. Add data-variant when the badge is not the default primary variant.
Inline SVG icons are spaced automatically by the badge gap.
Badges support right-to-left layouts through native text flow. Flip directional icons explicitly.
Examples
Variants
Use data-variant to change the badge variant.
With icon
Use data-icon="inline-start" or data-icon="inline-end" on the icon for icon-aware spacing.
With spinner
Use an inline loading icon with data-icon="inline-start" or data-icon="inline-end".
