1<span class="badge badge-pill badge-primary">Primary</span>
2<span class="badge badge-pill badge-secondary">Secondary</span>
3<span class="badge badge-pill badge-success">Success</span>
4<span class="badge badge-pill badge-danger">Danger</span>
5<span class="badge badge-pill badge-warning">Warning</span>
6<span class="badge badge-pill badge-info">Info</span>
7<span class="badge badge-pill badge-light">Light</span>
8<span class="badge badge-pill badge-dark">Dark</span>
1Add any of the below mentioned modifier classes to change the appearance
2of a badge.
3<span class="badge badge-primary">Primary</span>
4<span class="badge badge-secondary">Secondary</span>
5<span class="badge badge-success">Success</span>
6<span class="badge badge-danger">Danger</span>
7<span class="badge badge-warning">Warning</span>
8<span class="badge badge-info">Info</span>
9<span class="badge badge-light">Light</span>
10<span class="badge badge-dark">Dark</span>
11
1<!-- Badge Example -->
2<h1>Example heading <span class="badge bg-secondary">New</span></h1>
3<h2>Example heading <span class="badge bg-secondary">New</span></h2>
4<h3>Example heading <span class="badge bg-secondary">New</span></h3>
5<h4>Example heading <span class="badge bg-secondary">New</span></h4>
6<h5>Example heading <span class="badge bg-secondary">New</span></h5>
7<h6>Example heading <span class="badge bg-secondary">New</span></h6>
8
9<!-- Background colors -->
10<span class="badge bg-primary">Primary</span>
11<span class="badge bg-secondary">Secondary</span>
12<span class="badge bg-success">Success</span>
13<span class="badge bg-danger">Danger</span>
14<span class="badge bg-warning text-dark">Warning</span>
15<span class="badge bg-info text-dark">Info</span>
16<span class="badge bg-light text-dark">Light</span>
17<span class="badge bg-dark">Dark</span>
18
19<!-- Pill badges -->
20<span class="badge rounded-pill bg-primary">Primary</span>
21<span class="badge rounded-pill bg-secondary">Secondary</span>
22<span class="badge rounded-pill bg-success">Success</span>
23<span class="badge rounded-pill bg-danger">Danger</span>
24<span class="badge rounded-pill bg-warning text-dark">Warning</span>
25<span class="badge rounded-pill bg-info text-dark">Info</span>
26<span class="badge rounded-pill bg-light text-dark">Light</span>
27<span class="badge rounded-pill bg-dark">Dark</span>
1<span class="badge rounded-pill bg-primary">Primary</span>
2<span class="badge rounded-pill bg-secondary">Secondary</span>
3<span class="badge rounded-pill bg-success">Success</span>
4<span class="badge rounded-pill bg-danger">Danger</span>
5<span class="badge rounded-pill bg-warning text-dark">Warning</span>
6<span class="badge rounded-pill bg-info text-dark">Info</span>
7<span class="badge rounded-pill bg-light text-dark">Light</span>
8<span class="badge rounded-pill bg-dark">Dark</span>
1Badges scale to match the size of the immediate parent element by
2using relative font sizing and em units.
3<h1>Example heading <span class="badge badge-secondary">New</span></h1>
4<h2>Example heading <span class="badge badge-secondary">New</span></h2>
5<h3>Example heading <span class="badge badge-secondary">New</span></h3>
6<h4>Example heading <span class="badge badge-secondary">New</span></h4>
7<h5>Example heading <span class="badge badge-secondary">New</span></h5>
8<h6>Example heading <span class="badge badge-secondary">New</span></h6>
9<button type="button" class="btn btn-primary">
10 Profile <span class="badge badge-light">9</span>
11 <span class="sr-only">unread messages</span>
12</button>
1Using the contextual .badge-* classes on an <a> element quickly provide
2actionable badges with hover and focus states.
3
4<a href="#" class="badge badge-primary">Primary</a>
5<a href="#" class="badge badge-secondary">Secondary</a>
6<a href="#" class="badge badge-success">Success</a>
7<a href="#" class="badge badge-danger">Danger</a>
8<a href="#" class="badge badge-warning">Warning</a>
9<a href="#" class="badge badge-info">Info</a>
10<a href="#" class="badge badge-light">Light</a>
11<a href="#" class="badge badge-dark">Dark</a>