Add any of the below mentioned modifier classes to change the appearance of a badge.
<b-badge class="border border-primary text-primary" variant="none">Primary</b-badge>
<b-badge class="border border-secondary text-secondary" variant="none">Secondary</b-badge>
<b-badge class="border border-success text-success" variant="none">Success</b-badge>
<b-badge class="border border-danger text-danger" variant="none">Danger</b-badge>
<b-badge class="border border-warning text-warning" variant="none">Warning</b-badge>
<b-badge class="border border-info text-info" variant="none">Info</b-badge>
<b-badge class="border border-light text-light" variant="none">Light</b-badge>
<b-badge class="border border-dark text-dark" variant="none">Dark</b-badge>
<h5 class="card-title mt-4">Pill badges</h5>
<p>Use the <code>.badge-pill</code> modifier class to make badges more rounded (with a larger <code>border-radius</code> and additional horizontal <code>padding</code>). Useful if you miss the badges from v3.</p>
<b-badge class="border border-primary text-primary" pill variant="none">Primary</b-badge>
<b-badge class="border border-secondary text-secondary" pill variant="none">Secondary</b-badge>
<b-badge class="border border-success text-success" pill variant="none">Success</b-badge>
<b-badge class="border border-danger text-danger" pill variant="none">Danger</b-badge>
<b-badge class="border border-warning text-warning" pill variant="none">Warning</b-badge>
<b-badge class="border border-info text-info" pill variant="none">Info</b-badge>
<b-badge class="border border-light text-light" pill variant="none">Light</b-badge>
<b-badge class="border border-dark text-dark" pill variant="none">Dark</b-badge>
<h5 class="card-title mt-4">Links</h5>
<p>Using the contextual <code>.badge-*</code> classes on an <code><a></code> element quickly provide <em>actionable</em> badges with hover and focus states.</p>
<b-badge href="#" class="border border-primary text-primary" variant="none">Primary</b-badge>
<b-badge href="#" class="border border-secondary text-secondary" variant="none">Secondary</b-badge>
<b-badge href="#" class="border border-success text-success" variant="none">Success</b-badge>
<b-badge href="#" class="border border-danger text-danger" variant="none">Danger</b-badge>
<b-badge href="#" class="border border-warning text-warning" variant="none">Warning</b-badge>
<b-badge href="#" class="border border-info text-info" variant="none">Info</b-badge>
<b-badge href="#" class="border border-light text-light" variant="none">Light</b-badge>
<b-badge href="#" class="border border-dark text-dark" variant="none">Dark</b-badge>
PrimarySecondarySuccessDangerWarningInfoLightDarkPill badges
Use the .badge-pill
modifier class to make badges more rounded (with a larger border-radius
and additional horizontal padding
). Useful if you miss the badges from v3.
PrimarySecondarySuccessDangerWarningInfoLightDarkLinks
Using the contextual .badge-*
classes on an <a>
element quickly provide actionable badges with hover and focus states.
PrimarySecondarySuccessDangerWarningInfoLightDark