Badge / Tag
Inline labels for status, categories, and metadata. Includes standard badges and pill-shaped tags with removable and semantic variants.
Variants
Three styles — filled (default), bordered, and soft — combined with six colors: primary, secondary, info, danger, success, and warning.
html
Primary
Secondary
Info
Danger
Success
Warning
Primary
Info
Danger
Success
Primary
Secondary
Info
Danger
Success
Warning
<div class="vt-flex vt-flex-wrap vt-items-center vt-gap-3">
<span class="vt-badge">Primary</span>
<span class="vt-badge vt-badge-secondary">Secondary</span>
<span class="vt-badge vt-badge-info">Info</span>
<span class="vt-badge vt-badge-danger">Danger</span>
<span class="vt-badge vt-badge-success">Success</span>
<span class="vt-badge vt-badge-warning">Warning</span>
</div>
<div class="vt-flex vt-flex-wrap vt-items-center vt-gap-3">
<span class="vt-badge vt-badge-bordered">Primary</span>
<span class="vt-badge vt-badge-bordered vt-badge-info">Info</span>
<span class="vt-badge vt-badge-bordered vt-badge-danger">Danger</span>
<span class="vt-badge vt-badge-bordered vt-badge-success">Success</span>
</div>
<div class="vt-flex vt-flex-wrap vt-items-center vt-gap-3">
<span class="vt-badge vt-badge-soft">Primary</span>
<span class="vt-badge vt-badge-soft vt-badge-secondary">Secondary</span>
<span class="vt-badge vt-badge-soft vt-badge-info">Info</span>
<span class="vt-badge vt-badge-soft vt-badge-danger">Danger</span>
<span class="vt-badge vt-badge-soft vt-badge-success">Success</span>
<span class="vt-badge vt-badge-soft vt-badge-warning">Warning</span>
</div>
With Icon
Badges can include a leading icon or dot indicator.
html
Active
Verified
Featured
React
<div class="vt-badge">
<span class="vt-dot vt-dot-sm vt-dot-current"></span>
Active
</div>
<div class="vt-badge vt-badge-secondary">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true">
<path d="M5 13.2592L7.58583 15.9568C8.2525 16.6523 8.58583 17 9.00004 17C9.41425 17 9.74759 16.6523 10.4143 15.9568L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
Verified
</div>
<div class="vt-badge vt-badge-secondary vt-badge-bordered">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true">
<path d="M12.7972 2.90494C13.2554 3.57043 13.9479 4.70769 14.6514 6.04507C15.1942 7.07701 15.4657 7.59298 15.8551 7.86959C16.2444 8.14621 16.812 8.2313 17.9472 8.40149C19.5204 8.63736 20.6806 8.89214 21.3467 9.05516C21.735 9.15017 21.9976 9.50036 21.9976 9.9001C21.9976 10.1262 21.9127 10.344 21.7606 10.5113C21.0637 11.2777 20.3487 12.0836 19.4701 12.961C18.605 13.8249 18.1724 14.2569 18.0253 14.7261C17.8781 15.1954 17.9834 15.7792 18.1939 16.9469C18.3735 17.9433 18.5569 19.1306 18.6921 20.4219C18.7528 21.0024 18.2921 21.5 17.7085 21.5C17.6522 21.5 17.5967 21.4962 17.542 21.4824C17.0502 21.3578 15.919 20.7845 14.1246 19.7243C13.0722 19.1025 12.5461 18.7917 11.9993 18.7917C11.4526 18.7917 10.9265 19.1026 9.87427 19.7244C8.08025 20.7845 6.94977 21.3578 6.45797 21.4824C6.40334 21.4962 6.34784 21.5 6.29148 21.5C5.70788 21.5 5.24716 21.0024 5.30793 20.4219C5.44314 19.1306 5.6265 17.9433 5.80612 16.9469C6.01661 15.7792 6.12186 15.1954 5.97471 14.7261C5.82756 14.2569 5.395 13.8249 4.52987 12.961C3.65132 12.0836 2.93633 11.2777 2.23944 10.5113C2.08729 10.344 2.00244 10.1262 2.00244 9.9001C2.00244 9.50036 2.265 9.15017 2.65328 9.05516C3.31945 8.89214 4.4796 8.63736 6.05284 8.40149C7.18801 8.2313 7.75559 8.14621 8.14498 7.86958C8.53437 7.59295 8.80577 7.07698 9.34859 6.04505C10.0521 4.70768 10.7445 3.57044 11.2026 2.90495C11.3825 2.64364 11.6827 2.5 11.9999 2.5C12.3171 2.5 12.6173 2.64364 12.7972 2.90494Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
Featured
</div>
<span class="vt-chip vt-chip-sm">
React
<button type="button" class="vt-chip-remove" aria-label="Remove React">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" aria-hidden="true">
<path d="M18 6L12 12M12 12L6 18M12 12L18 18M12 12L6 6" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
</button>
</span>
Semantic Colors
Soft badges provide semantic status colors on a subtle tinted background.
html
Success
Warning
Danger
Info
<div class="vt-flex vt-flex-wrap vt-items-center vt-gap-3">
<span class="vt-badge vt-badge-soft vt-badge-success">
Success
</span>
<span class="vt-badge vt-badge-soft vt-badge-warning">
Warning
</span>
<span class="vt-badge vt-badge-soft vt-badge-danger">
Danger
</span>
<span class="vt-badge vt-badge-soft vt-badge-info">
Info
</span>
</div>
Use Cases
Common usage patterns for badges.
html
Status indicators
Active
Pending
Error
Inactive
Tag list
Astro
React
TypeScript
VT Utilities
Open Source
Notification count
3
12
<div>
<p class="vt-text-sm vt-font-medium vt-mb-3 vt-text-foreground-muted">Status indicators</p>
<div class="vt-flex vt-flex-wrap vt-gap-2">
<span class="vt-badge vt-badge-soft vt-badge-info">Active</span>
<span class="vt-badge vt-badge-soft vt-badge-warning">Pending</span>
<span class="vt-badge vt-badge-soft vt-badge-danger">Error</span>
<span class="vt-badge vt-badge-soft vt-badge-secondary">Inactive</span>
</div>
</div>
<div>
<p class="vt-text-sm vt-font-medium vt-mb-3 vt-text-foreground-muted">Tag list</p>
<div class="vt-flex vt-flex-wrap vt-gap-2">
<div class="vt-badge vt-badge-secondary vt-badge-bordered">
Astro
</div>
<div class="vt-badge vt-badge-secondary vt-badge-bordered">
React
</div>
<div class="vt-badge vt-badge-secondary vt-badge-bordered">
TypeScript
</div>
<div class="vt-badge vt-badge-secondary vt-badge-bordered">
VT Utilities
</div>
<div class="vt-badge vt-badge-secondary vt-badge-bordered">
Open Source
</div>
</div>
</div>
<div>
<p class="vt-text-sm vt-font-medium vt-mb-3 vt-text-foreground-muted">Notification count</p>
<div class="vt-flex vt-items-center vt-gap-4">
<span class="vt-notification-badge">
<button class="vt-btn vt-btn-bordered">
Inbox
</button>
<span class="vt-count-badge">3</span>
</span>
<span class="vt-notification-badge vt-notification-badge-info">
<button class="vt-btn vt-btn-bordered">
Messages
</button>
<span class="vt-count-badge">12</span>
</span>
</div>
</div>
Guidelines
Active
Pending
Failed
Do
Beta
Draft
Paid
Do
3
12
Don't
API Reference
| Class | Type | Description |
|---|---|---|
vt-badge |
Base | Base badge — filled primary, rounded-full, 24px tall (14px leading icon) |
vt-badge-secondary |
Color | Neutral color (muted background / gray accent) |
vt-badge-danger |
Color | Red color for errors or destructive labels |
vt-badge-success |
Color | Green color for positive states |
vt-badge-warning |
Color | Orange color for warnings |
vt-badge-info |
Color | Blue color for informational states |
vt-badge-bordered |
Style | Outline style — combines with any color class |
vt-badge-soft |
Style | Soft style — 10% tinted background with colored text, combines with any color class |
vt-count-badge |
Base | Unread counter — 20px tall pill in the error color with a page-colored ring; on a button or avatar wrap both in vt-notification-badge |
Accessibility
| Feature | Details |
|---|---|
| Semantics | Badges are inline text — no special role needed for static labels |
| Removable | Remove buttons should have aria-label="Remove [tag name]" |
| Status | Use aria-label on status badges if color alone conveys meaning |
| Notification | Notification counters should use aria-label, e.g. "3 unread messages" |
Used in: