Ship faster with goilerplate templUI Pro

Badge

Badge component is used to display a small amount of information in a visual style.

Source Tailwind CSS

Badge

Installation

templui add badge

Examples

Primary

Badge

Secondary

Secondary

Outline

Outline

Destructive

Destructive

With Icon

With Icon

API Reference

Required parameter
Hover for description

Badge

Badge component for displaying small pieces of information.

Name Type Default
ID

Unique identifier for the badge element.

string
-
Class

Additional CSS classes to apply to the badge.

string
-
Attributes

Additional HTML attributes to apply to the badge element.

templ.Attributes
-
Variant

Visual style variant. Options: 'default', 'secondary', 'destructive', 'outline'.

Variant
default