Badges
Small count and labeling component.
Color variations
PrimaryAccentSecondarySuccessDangerWarningInfo
Light
Dark
<!-- Primary badge -->
<span class="badge bg-primary">Primary</span>
<!-- Accent badge -->
<span class="badge bg-accent">Accent</span>
<!-- Secondary badge -->
<span class="badge bg-secondary">Secondary</span>
<!-- Success badge -->
<span class="badge bg-success">Success</span>
<!-- Danger badge -->
<span class="badge bg-danger">Danger</span>
<!-- Warning badge -->
<span class="badge bg-warning">Warning</span>
<!-- Info badge -->
<span class="badge bg-info">Info</span>
<!-- Light badge -->
<span class="badge bg-light">Light</span>
<!-- Dark badge -->
<span class="badge bg-dark">Dark</span>
// Primary badge
span.badge.bg-primary Primary
// Accent badge
span.badge.bg-accent Accent
// Secondary badge
span.badge.bg-secondary Secondary
// Success badge
span.badge.bg-success Success
// Danger badge
span.badge.bg-danger Danger
// Warning badge
span.badge.bg-warning Warning
// Info badge
span.badge.bg-info Info
// Light badge
span.badge.bg-light Light
// Dark badge
span.badge.bg-dark Dark
Badge shadow
PrimaryAccentSecondarySuccessDangerWarningInfoLightDark
<!-- Primary badge with shadow -->
<span class="badge bg-primary badge-shadow">Primary</span>
<!-- Accent badge with shadow -->
<span class="badge bg-accent badge-shadow">Accent</span>
<!-- Secondary badge with shadow -->
<span class="badge bg-secondary badge-shadow">Secondary</span>
<!-- Success badge with shadow -->
<span class="badge bg-success badge-shadow">Success</span>
<!-- Danger badge with shadow -->
<span class="badge bg-danger badge-shadow">Danger</span>
<!-- Warning badge with shadow -->
<span class="badge bg-warning badge-shadow">Warning</span>
<!-- Info badge with shadow -->
<span class="badge bg-info badge-shadow">Info</span>
<!-- Light badge with shadow -->
<span class="badge bg-light badge-shadow">Light</span>
<!-- Dark badge with shadow -->
<span class="badge bg-dark badge-shadow">Dark</span>
// Primary badge with shadow
span.badge.bg-primary.badge-shadow Primary
// Accent badge with shadow
span.badge.bg-accent.badge-shadow Accent
// Secondary badge with shadow
span.badge.bg-secondary.badge-shadow Secondary
// Success badge with shadow
span.badge.bg-success.badge-shadow Success
// Danger badge with shadow
span.badge.bg-danger.badge-shadow Danger
// Warning badge with shadow
span.badge.bg-warning.badge-shadow Warning
// Info badge with shadow
span.badge.bg-info.badge-shadow Info
// Light badge with shadow
span.badge.bg-light.badge-shadow Light
// Dark badge with shadow
span.badge.bg-dark.badge-shadow Dark
Pill badges
PrimaryAccentSecondarySuccessDangerWarningInfo
Light
Dark
<!-- Primary badge -->
<span class="badge rounded-pill bg-primary">Primary</span>
<!-- Accent badge -->
<span class="badge rounded-pill bg-accent">Accent</span>
<!-- Secondary badge -->
<span class="badge rounded-pill bg-secondary">Secondary</span>
<!-- Success badge -->
<span class="badge rounded-pill bg-success">Success</span>
<!-- Danger badge -->
<span class="badge rounded-pill bg-danger">Danger</span>
<!-- Warning badge -->
<span class="badge rounded-pill bg-warning">Warning</span>
<!-- Info badge -->
<span class="badge rounded-pill bg-info">Info</span>
<!-- Light badge -->
<span class="badge rounded-pill bg-light">Light</span>
<!-- Dark badge -->
<span class="badge rounded-pill bg-dark">Dark</span>
// Primary badge
span.badge.rounded-pill.bg-primary Primary
// Accent badge
span.badge.rounded-pill.bg-accent Accent
// Secondary badge
span.badge.rounded-pill.bg-secondary Secondary
// Success badge
span.badge.rounded-pill.bg-success Success
// Danger badge
span.badge.rounded-pill.bg-danger Danger
// Warning badge
span.badge.rounded-pill.bg-warning Warning
// Info badge
span.badge.rounded-pill.bg-info Info
// Light badge
span.badge.rounded-pill.bg-light Light
// Dark badge
span.badge.rounded-pill.bg-dark Dark
Inside heading
Example heading New
Example heading New
Example heading New
Example heading New
Example heading New
Example heading New
<h1>Example heading <span class="badge bg-secondary">New</span></h1>
<h2>Example heading <span class="badge bg-secondary">New</span></h2>
<h3>Example heading <span class="badge bg-secondary">New</span></h3>
<h4>Example heading <span class="badge bg-secondary">New</span></h4>
<h5>Example heading <span class="badge bg-secondary">New</span></h5>
<h6>Example heading <span class="badge bg-secondary">New</span></h6>
h1
| Example heading
span.badge.bg-secondary New
h2
| Example heading
span.badge.bg-secondary New
h3
| Example heading
span.badge.bg-secondary New
h4
| Example heading
span.badge.bg-secondary New
h5
| Example heading
span.badge.bg-secondary New
h6
| Example heading
span.badge.bg-secondary New
Inside button
<!-- Button + badge -->
<button type="button" class="btn btn-primary">
Notifications <span class="badge bg-light ms-1">4</span>
</button>
<!-- Pill button + pill badge -->
<button type="button" class="btn rounded-pill btn-dark">
Profile <span class="badge rounded-pill bg-warning ms-1">9</span>
</button>
<!-- Outline button + badge -->
<button type="button" class="btn btn-outline-secondary">
Messages <span class="badge bg-success ms-1">18</span>
</button>
// Button + badge
button(type="button").btn.btn-primary
| Notifications
span.badge.bg-light.ms-1 4
// Pill button + pill badge
button(type="button").btn.rounded-pill.btn-dark
| Profile
span.badge.rounded-pill.bg-warning.ms-1 9
// Outline button + badge
button(type="button").btn.btn-outline-secondary
| Messages
span.badge.bg-success.ms-1 18
Inside list group
<!-- Badges inside list group -->
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
Messages
<span class="badge rounded-pill bg-info">14</span>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
Orders
<span class="badge rounded-pill bg-warning">2</span>
</a>
<a href="#" class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
Favourites
<span class="badge rounded-pill bg-danger">6</span>
</a>
</div>
// Badges inside list group
.list-group
a(href="#").list-group-item.list-group-item-action.d-flex.justify-content-between.align-items-center
| Messages
span.badge.rounded-pill.bg-info 14
a(href="#").list-group-item.list-group-item-action.d-flex.justify-content-between.align-items-center
| Orders
span.badge.rounded-pill.bg-warning 2
a(href="#").list-group-item.list-group-item-action.d-flex.justify-content-between.align-items-center
| Favourites
span.badge.rounded-pill.bg-danger 6