Elements
Badge <> show code
<h1>Example heading <span class="badge bg-secondary">New</span></h1>
<h2>Example heading <span class="badge bg-secondary">New</span></h2>
<h3>Example heading <span class="badge bg-secondary">New</span></h3>
<h4>Example heading <span class="badge bg-secondary">New</span></h4>
<h5>Example heading <span class="badge bg-secondary">New</span></h5>
<h6>Example heading <span class="badge bg-secondary">New</span></h6>
<!-- Example - 2 -->
<button type="button" class="btn btn-primary">Notifications<span class="badge bg-secondary">5</span></button>
<button type="button" class="btn btn-primary position-relative">
Inbox
<span class="position-absolute top-0 start-100 ms-0 translate-middle badge rounded-pill bg-danger">
99+
<span class="visually-hidden">unread messages</span>
</span>
</button>
<button type="button" class="btn btn-primary position-relative">
Profile
<span class="position-absolute top-0 start-100 translate-middle p-2 bg-danger border border-light rounded-circle">
<span class="visually-hidden">New alerts</span>
</span>
</button>
How to use
Small and adaptive tag for adding context to just about any content.
- Use the .badge class with <span> element inside main element.
Example 1
Example heading New
Example heading New
Example heading New
Example heading New
Example heading New
Example heading New
Example 2
Variations <> show code
<span class="badge bg-primary">Primary</span>
<span class="badge bg-secondary">Secondary</span>
<span class="badge bg-success">Success</span>
<!-- Pill badge -->
<span class="badge rounded-pill bg-primary">Primary</span>
<span class="badge rounded-pill bg-secondary">Secondary</span>
<span class="badge rounded-pill bg-success">Success</span>
<!-- Link Badge -->
<a href="javascript:void(0)" class="badge bg-primary">Primary</a>
<a href="javascript:void(0)" class="badge bg-secondary">Secondary</a>
<a href="javascript:void(0)" class="badge bg-success">Success</a>
How to use variation
- To get prestyled badge just use the .badge-default or .badge-primary or .badge-success or .badge-info or .badge-warning or .badge-danger class with .badge class.
© Copyright Bigbag Store Bootstrap Template by Abdus.