Skip to main content

Introduction

The badge component is used to render a small box with some text inside:

Setting the size of a badge

By default, the size of a badge is “medium”. You can make it “extra small” or “small” by using the size attribute:

Changing the color of the badge

By default, the color of a badge is “primary”. You can change it to be danger, gray, info, success or warning by using the color attribute:

Adding an icon to a badge

You can add an icon to a badge by using the icon attribute:
You can also change the icon’s position to be after the text instead of before it, using the icon-position attribute: