Badges

Documentation and examples for badges, our small count and labeling component.

Default badges

Documentation and examples for badges, our small count and labeling component.

primary secondary success danger warning info light dark alternate contrast darker black

Outline badges

In need of a badge, but not the hefty background colors they bring? Replace the default modifier classes with the .badge-outline-* ones to remove all background images and colors on any badge.

primary secondary success danger warning info light dark alternate contrast darker black

Rounded

Use the .badge-pill modifier class to make badges more rounded (with a larger border-radius and additional horizontal padding). Useful if you miss the badges from v3.

primary secondary success danger warning info light dark alternate contrast darker black
primary secondary success danger warning info light dark alternate contrast darker black

Light badges

Some colors are better seen on dark backgrounds, those are the ones with light colors.

badge-contrast badge-outline-contrast badge-light badge-outline-light

Scaling

Badges scale to match the size of the immediate parent element by using relative font sizing and em units.

Example heading New

Example heading New

Example heading New

Example heading New

Example heading New
Example heading New

Custom Badges

By adding some utilities classes you can customize the spacing and look.

primary secondary success danger warning info light dark alternate contrast darker black

Badges with Icons

You can include an icon to a badge to give context.

Awesome badge Awesome badge Awesome badge Awesome badge Awesome badge Awesome badge Awesome badge Awesome badge Awesome badge Awesome badge Awesome badge Awesome badge

Badge in Buttons

Badges can be used as part of links or buttons to provide a counter.