Bootstrap 5 is the latest major release by Bootstrap where they have revamped the UI and made various changes. Badges are used for creating labels. Badges scale to match the size of the immediate parent element by using relative font sizing.
Badge Headings:Badge headings can be used to label the latest information about the headings.
Badges Buttons:The badge class is used to show the small count or notification dot.
Badges Positioned: It is used to position the badge in the corner of the button or to make the link look more appealing.
Background colors: Badges Background colors provide different utility classes for backgrounds that help to enhance the appearance of a badge.
Pill Badges:Pill badges can be made by using the rounded-pill class on the badge component.
SASS: It is used to change the default value of the badge’s font size, font color, padding, border radius, and font weight.
<div class="badge bg-type"> Contents... <div>
Example 1: This example demonstrates the working of the first four types of Badges in Bootstrap 5.
Please Login to comment...