Badges are similar to labels; the primary difference is that the corners are more rounded. Badges are mainly used to highlight new or unread items. Example:-
<h1>Example heading <span class=" badge-secondary">New</span></h1>
Contextual Badges:
Contextual classes use to change the color of a badge. Example:-
<span class="badge badge-primary">Primary</span>
Pill Badges:-
Use the .badge-pill class to make the badges more round. Example:-
<span class="badge badge-pill badge-primary">Primary</span>
Badge inside an Element(button):-
An example of using a badge inside a button.
<button type="button" class="btn btn-primary">
create button <span class="badge badge-light">1</span>
</button>
Latest posts by vikashdev k (see all)
- PHP OOP: Traits - October 25, 2021
- PHP OOP: Late Static Binding - October 25, 2021
- PHP OOP : Static Members - October 23, 2021