Badges are small count and labeling components, which are used to add extra information to an interface element. You can use them to draw users' attention to a new element, notify about unread messages or provide any kind of additional info.

Default markup

The default badges are square and come in the basic set of colors.

blue azure indigo purple pink red orange yellow lime green teal cyan
<span class="badge bg-blue">blue</span>
<span class="badge bg-azure">azure</span>
<span class="badge bg-indigo">indigo</span>
<span class="badge bg-purple">purple</span>
<span class="badge bg-pink">pink</span>
<span class="badge bg-red">red</span>
<span class="badge bg-orange">orange</span>
<span class="badge bg-yellow">yellow</span>
<span class="badge bg-lime">lime</span>
<span class="badge bg-green">green</span>
<span class="badge bg-teal">teal</span>
<span class="badge bg-cyan">cyan</span>

Pill badges

Use the .badge-pill class if you want to create a badge with rounded corners. Its width will adjust to the label text.

1 2 3 4 5 6 7 8 9 10 11 12
<span class="badge badge-pill bg-blue">1</span>
<span class="badge badge-pill bg-azure">2</span>
<span class="badge badge-pill bg-indigo">3</span>
<span class="badge badge-pill bg-purple">4</span>
<span class="badge badge-pill bg-pink">5</span>
<span class="badge badge-pill bg-red">6</span>
<span class="badge badge-pill bg-orange">7</span>
<span class="badge badge-pill bg-yellow">8</span>
<span class="badge badge-pill bg-lime">9</span>
<span class="badge badge-pill bg-green">10</span>
<span class="badge badge-pill bg-teal">11</span>
<span class="badge badge-pill bg-cyan">12</span>

Soft color badges

You can create a soft colour variant of a corresponding contextual badge variation, to make it look more subtle. Click here to see the list of available colors and choose ones that best suit your design.

blue azure indigo purple pink red orange yellow lime green teal cyan
<span class="badge bg-blue-lt">blue</span>
<span class="badge bg-azure-lt">azure</span>
<span class="badge bg-indigo-lt">indigo</span>
<span class="badge bg-purple-lt">purple</span>
<span class="badge bg-pink-lt">pink</span>
<span class="badge bg-red-lt">red</span>
<span class="badge bg-orange-lt">orange</span>
<span class="badge bg-yellow-lt">yellow</span>
<span class="badge bg-lime-lt">lime</span>
<span class="badge bg-green-lt">green</span>
<span class="badge bg-teal-lt">teal</span>
<span class="badge bg-cyan-lt">cyan</span>

Place the badge within an <a> element if you want it to perform the function of a link and make it clickable.

<a href="#" class="badge bg-blue">blue</a>
<a href="#" class="badge bg-azure">azure</a>
<a href="#" class="badge bg-indigo">indigo</a>
<a href="#" class="badge bg-purple">purple</a>
<a href="#" class="badge bg-pink">pink</a>
<a href="#" class="badge bg-red">red</a>
<a href="#" class="badge bg-orange">orange</a>
<a href="#" class="badge bg-yellow">yellow</a>
<a href="#" class="badge bg-lime">lime</a>
<a href="#" class="badge bg-green">green</a>
<a href="#" class="badge bg-teal">teal</a>
<a href="#" class="badge bg-cyan">cyan</a>

Empty badges

Leave the HTML element empty if you want to create badges without any text. Empty badges are particularly useful if you want to make an interface element more noticeable regardless of limited space.

<a href="#" class="badge bg-blue"></a>
<a href="#" class="badge bg-azure"></a>
<a href="#" class="badge bg-indigo"></a>
<a href="#" class="badge bg-purple"></a>
<a href="#" class="badge bg-pink"></a>
<a href="#" class="badge bg-red"></a>
<a href="#" class="badge bg-orange"></a>
<a href="#" class="badge bg-yellow"></a>
<a href="#" class="badge bg-lime"></a>
<a href="#" class="badge bg-green"></a>
<a href="#" class="badge bg-teal"></a>
<a href="#" class="badge bg-cyan"></a>

Badge avatars

Create the .badge-avatar class to add an avatar that will make a badge more personalized.

Paweł Kuna JL Jeffie Lewzey Mallory Hulme Dunn Slane Emmy Levet
<span class="badge">
  <span class="avatar" style="background-image: url(...)"></span>
  Paweł Kuna
</span>
<span class="badge">
  <span class="avatar" style="background-image: url(...)">JL</span>
  Jeffie Lewzey
</span>
<span class="badge">
  <span class="avatar" style="background-image: url(...)"></span>
  Mallory Hulme
</span>
<span class="badge">
  <span class="avatar" style="background-image: url(...)"></span>
  Dunn Slane
</span>
<span class="badge">
  <span class="avatar" style="background-image: url(...)"></span>
  Emmy Levet
</span>

Button with badge

Badges can be used as part of links or buttons to provide a counter.

<button type="button" class="btn">
  Notifications <span class="badge bg-red ms-2">4</span>
</button>
<button type="button" class="btn">
  Notifications <span class="badge bg-green ms-2">4</span>
</button>