## Usage
Import Tailwind and one full Basecoat style bundle.
```css
@import "tailwindcss";
@import "basecoat-css/vega.css";
```
Or import only the base CSS, Badge component CSS, and one style pack.
```css
@import "tailwindcss";
@import "basecoat-css/base.css";
@import "basecoat-css/components/badge.css";
@import "basecoat-css/styles/vega.css";
```
Using CDN or bundler imports? See the [Installation page](/installation).
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.
```html
DefaultSecondaryDestructiveOutlineGhost
```
Badges support right-to-left layouts through native text flow. Flip directional icons explicitly.
## Examples
### Variants
Use `data-variant` to change the badge variant.
DefaultSecondaryDestructiveOutlineGhost
### With icon
Use `data-icon="inline-start"` or `data-icon="inline-end"` on the icon for icon-aware spacing.
Verified
Bookmark
### With spinner
Use an inline loading icon with `data-icon="inline-start"` or `data-icon="inline-end"`.