Bootstrap badge scale to suit the size of the parent element by using relative font sizing and em
units.
Badges can be used as part of links or buttons to provide a counter.
Add any of the below-mentioned classes to modify the presentation of a badge. Please note that when using Bootstrap’s default .bg-light
, you’ll likely need a text color utility like .text-dark
for proper styling. This is because background utilities do not set anything but background-color
.
Apply the .rounded-pill
modifier class to make badges rounded.