Badge
A component that displays small labels, counters, or status indicators in a compact, visually distinct format.
badge
API Reference
BadgeProps
Extends all the standard HTML attributes of the `<span>` element.
| Property | Type | Default | Description |
|---|---|---|---|
ref $bindable | HTMLSpanElement | Reference to the rendered DOM element. | |
color | union | Color of badge | |
size | union | "2" | Size of badge |
radius | union | Radius of badge | |
variant | union | "solid" | Variant of badge |
disabled | boolean | false | Disable badge |
children | Snippet | Badge content to render |
Examples
Colors
neutral blue green yellow orange red
Sizes
size 1 size 2 size 3 1 2 3
States
default disabled
Variants
solid soft outline