Primary
Badge
package showcase
import "github.com/templui/templui/internal/components/badge"
templ BadgeDefault() {
@badge.Badge() {
Badge
}
}
Badge component is used to display a small amount of information in a visual style.
templui add badgePrimary
Secondary
Outline
Destructive
With Icon
Badge component for displaying small pieces of information.
| Name | Type | Default |
|---|---|---|
Unique identifier for the badge element. | | - |
Additional CSS classes to apply to the badge. | | - |
Additional HTML attributes to apply to the badge element. | | - |
Visual style variant. Options: 'default', 'secondary', 'destructive', 'outline'. | | |