Badge

A short label for a status or a count.

Feedback Added in v0.41.0 Updated

Variants

Default Secondary Outline Destructive Success Warning Info

<div class="flex flex-wrap items-center gap-2">
	{ui badge, title: 'Default' /}
	{ui badge, title: 'Secondary', class: 'bg-well' /}
	{ui badge, title: 'Outline', class: 'badge-outline' /}
	{ui badge, title: 'Destructive', class: 'bg-destructive' /}
	{ui badge, title: 'Success', class: 'bg-success' /}
	{ui badge, title: 'Warning', class: 'bg-warning' /}
	{ui badge, title: 'Info', class: 'bg-info' /}
</div>

The bg-success, bg-warning, bg-info and bg-destructive fills use their own tokens, and badge-outline is the outlined look. A badge is not interactive. For something to click, use a button or put the badge inside a link.

With an icon

Verified Failed

<div class="flex flex-wrap items-center gap-2">
	{ui badge, title: 'Verified', icon: 'check' /}
	{ui badge, title: 'Failed', icon: 'circle-alert', class: 'bg-destructive' /}
</div>

Beside text

Release notes New


<h3 class="text-lg font-semibold">
	Release notes
	{ui badge, title: 'New', class: 'bg-well' /}
</h3>

A badge has its own small text size, so it looks the same beside a heading or a paragraph. Space it with a utility such as ml-2, passed as class.