Bootstrap 4 Tutorial
Badges are a way to provide any content more details. Rectangular badges can be made by combining the .badge class with a contextual class (such as .badge-secondary) inside <span> elements. Keep in mind that badges scale to the parent element’s size, if any:
Example heading New
Example heading New
Example heading New
Example heading New
Example heading New
Example heading New
Primary Secondary Success Danger Warning Info Light Dark
To alter a badge’s color, use any of the contextual classes (.badge-*):
Primary
Secondary
Success
Danger
Warning
Info
Light
Dark
Primary Secondary Success Danger Warning Info Light Dark
To make the badges rounder, use the .badge-pill class:
Primary
Secondary
Success
Danger
Warning
Info
Light
Dark
Using a badge within a button, for instance:
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.