Badges
File: ./scss/components/badges
Example heading New
Example heading New
Example heading New
Example heading New
Example heading New
<h1>Example heading <span class="badge">New</span></h1>
<h2>Example heading <span class="badge">New</span></h2>
<h3>Example heading <span class="badge">New</span></h3>
<h4>Example heading <span class="badge">New</span></h4>
<h5>Example heading <span class="badge">New</span></h5>
Inline badges
Inline badges conform to to the surrounding text's line-height.
Example paragraph with an inline badge in the text.
<p>
Example paragraph with an
<span class="badge badge-primary badge-inline">inline badge</span> in the
text.
</p>
Usage with buttons & links
Badges can be used as part of links or buttons to provide a counter.
<button type="button" class="btn btn-primary">
Notifications <span class="badge badge-light">4</span>
</button>
Contextual variations
Adding context to the badges:
Primary
Secondary
Success
Danger
Warning
Info
Light
Dark
Branded
<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>
<span class="badge badge-branded">Branded</span>
Pills
Primary
Secondary
Success
Danger
Warning
Info
Light
Dark
Branded
<span class="badge badge-pill badge-primary">Primary</span>
<span class="badge badge-pill badge-secondary">Secondary</span>
<span class="badge badge-pill badge-success">Success</span>
<span class="badge badge-pill badge-danger">Danger</span>
<span class="badge badge-pill badge-warning">Warning</span>
<span class="badge badge-pill badge-info">Info</span>
<span class="badge badge-pill badge-light">Light</span>
<span class="badge badge-pill badge-dark">Dark</span>
<span class="badge badge-pill badge-branded">Branded</span>
Pill sizes
Primary
Secondary
Warning
<span class="badge badge-pill badge-primary">Primary</span>
<span class="badge badge-pill badge-secondary">Secondary</span>
<span class="badge badge-pill badge-warning">Warning</span>
Round pills
0
2
12
123
1
<span class="badge badge-pill-round badge-primary">0</span>
<span class="badge badge-pill-round badge-secondary">1</span>
<span class="badge badge-pill-round badge-success">2</span>
<span class="badge badge-pill-round badge-danger">12</span>
<span class="badge badge-pill-round badge-warning">123</span>
<span class="badge badge-pill-round badge-info">1</span>
<span class="badge badge-pill-round badge-light">1</span>
<span class="badge badge-pill-round badge-dark">1</span>
Links
<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>