Skip to main content

Starwind UI v1.3.1 is now available! Get started

Badge

Badge

Installation

The Badge component can also function as a link (<a> tag) by providing an href prop.

Usage

variant

default
primary
secondary
outline
ghost
info
success
warning
error

size

small
medium
large

API Reference

PropTypeDefault
variant"default" | "primary" | "secondary" | "outline" | "ghost" | "info" | "success" | "warning" | "error""default"
size"sm" | "md" | "lg""md"

The component also accepts all standard HTML attributes for both <div> and <a> elements.

Changelog

v1.1.0

  • tailwind-variants now implemented. This uses tailwind-merge under the hood to merge Tailwind classes without style conflicts, allowing you to override any existing classes using the “class” prop.