Badges
Default
A simple labeling component. Badges scale to match the size of the immediate parent element by using relative font sizing and em
units.
h1.Example heading New
h2.Example heading New
h3.Example heading
h4.Example heading Info Link
h5.Example heading New
h6.Example heading New
<h1>h1.Example heading <span class="badge badge-secondary">New</span></h1>
<h2>h2.Example heading <span class="badge badge-success-lighten">New</span></h2>
<h3>
h3.Example heading
<button type="button" class="btn btn-sm btn-primary">
Notifications <span class="badge badge-light">4</span>
</button>
</h3>
<h4>h4.Example heading <a href="#" class="badge badge-info-lighten">Info Link</a></h4>
<h5>h5.Example heading <span class="badge badge-outline-warning">New</span></h5>
<h6>h6.Example heading <span class="badge badge-danger">New</span></h6>
Pill Badges
Use the .badge-pill
modifier class to make badges more rounded.
Lighten Badges
Use the .badge-*-lighten
modifier class to make badges lighten.
Outline Badges
Using the .badge-outline-*
to quickly create a bordered badges.
<!-- Default Badges -->
<span class="badge badge-primary badge-pill">Primary</span>
<span class="badge badge-secondary badge-pill">Secondary</span>
<span class="badge badge-success badge-pill">Success</span>
<span class="badge badge-danger badge-pill">Danger</span>
<span class="badge badge-warning badge-pill">Warning</span>
<span class="badge badge-info badge-pill">Info</span>
<span class="badge badge-light badge-pill">Light</span>
<span class="badge badge-dark badge-pill">Dark</span>
<!-- Lighten Badges -->
<span class="badge badge-primary-lighten badge-pill">Primary</span>
<span class="badge badge-secondary-lighten badge-pill">Secondary</span>
<span class="badge badge-success-lighten badge-pill">Success</span>
<span class="badge badge-danger-lighten badge-pill">Danger</span>
<span class="badge badge-warning-lighten badge-pill">Warning</span>
<span class="badge badge-info-lighten badge-pill">Info</span>
<span class="badge badge-light-lighten badge-pill">Light</span>
<span class="badge badge-dark-lighten badge-pill">Dark</span>
<!-- Outline Badges -->
<span class="badge badge-outline-primary badge-pill">Primary</span>
<span class="badge badge-outline-secondary badge-pill">Secondary</span>
<span class="badge badge-outline-success badge-pill">Success</span>
<span class="badge badge-outline-danger badge-pill">Danger</span>
<span class="badge badge-outline-warning badge-pill">Warning</span>
<span class="badge badge-outline-info badge-pill">Info</span>
<span class="badge badge-outline-light badge-pill">Light</span>
<span class="badge badge-outline-dark badge-pill">Dark</span>
Contextual variations
Add any of the below mentioned modifier classes to change the appearance of a badge.
Badge can be more contextual as well. Just use regular convention e.g. badge-*color
, badge-primary
to have badge with different background.
Lighten Badges
Using the .badge-*-lighten
modifier class, you can have more soften variation.
Outline Badges
Using the .badge-outline-*
to quickly create a bordered badges.
<!-- Default Badges -->
<span class="badge badge-primary">Primary</span>
<span class="badge badge-secondary">Secondary</span>
<span class="badge badge-success">Success</span>
<span class="badge badge-danger">Danger</span>
<span class="badge badge-warning">Warning</span>
<span class="badge badge-info">Info</span>
<span class="badge badge-light">Light</span>
<span class="badge badge-dark">Dark</span>
<!-- Lighten Badges -->
<span class="badge badge-primary-lighten">Primary</span>
<span class="badge badge-secondary-lighten">Secondary</span>
<span class="badge badge-success-lighten">Success</span>
<span class="badge badge-danger-lighten">Danger</span>
<span class="badge badge-warning-lighten">Warning</span>
<span class="badge badge-info-lighten">Info</span>
<span class="badge badge-light-lighten">Light</span>
<span class="badge badge-dark-lighten">Dark</span>
<!-- Outline Badges -->
<span class="badge badge-outline-primary">Primary</span>
<span class="badge badge-outline-secondary">Secondary</span>
<span class="badge badge-outline-success">Success</span>
<span class="badge badge-outline-danger">Danger</span>
<span class="badge badge-outline-warning">Warning</span>
<span class="badge badge-outline-info">Info</span>
<span class="badge badge-outline-light">Light</span>
<span class="badge badge-outline-dark">Dark</span>
Links Badges
Using the contextual .badge-*
classes on an <a>
element quickly provide actionable badges with hover and focus states.
Lighten Badges
Use the .badge-*-lighten
modifier class to make badges lighten.
Outline Badges
Using the .badge-outline-*
to quickly create a bordered badges.
<!-- Default Badges -->
<a href="#" class="badge badge-primary">Primary</a>
<a href="#" class="badge badge-secondary">Secondary</a>
<a href="#" class="badge badge-success">Success</a>
<a href="#" class="badge badge-danger">Danger</a>
<a href="#" class="badge badge-warning">Warning</a>
<a href="#" class="badge badge-info">Info</a>
<a href="#" class="badge badge-light">Light</a>
<a href="#" class="badge badge-dark">Dark</a>
<!-- Lighten Badges -->
<a href="#" class="badge badge-primary-lighten">Primary</a>
<a href="#" class="badge badge-secondary-lighten">Secondary</a>
<a href="#" class="badge badge-success-lighten">Success</a>
<a href="#" class="badge badge-danger-lighten">Danger</a>
<a href="#" class="badge badge-warning-lighten">Warning</a>
<a href="#" class="badge badge-info-lighten">Info</a>
<a href="#" class="badge badge-light-lighten">Light</a>
<a href="#" class="badge badge-dark-lighten">Dark</a>
<!-- Outline Badges -->
<a href="#" class="badge badge-outline-primary">Primary</a>
<a href="#" class="badge badge-outline-secondary">Secondary</a>
<a href="#" class="badge badge-outline-success">Success</a>
<a href="#" class="badge badge-outline-danger">Danger</a>
<a href="#" class="badge badge-outline-warning">Warning</a>
<a href="#" class="badge badge-outline-info">Info</a>
<a href="#" class="badge badge-outline-light">Light</a>
<a href="#" class="badge badge-outline-dark">Dark</a>