Badge
Badge renders a compact status label. It supports text icons and Iconify icon specs.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Compact label with variants and optional icons
Badge renders a compact status label. It supports text icons and Iconify icon specs.
ui.badge('Ready', {
iconComponent = 'lucide:check',
variant = 'secondary'
})
ui.badge(label, props?)
lui.badge(label, props?)
| Prop | Type | Description |
|---|---|---|
label | string | reactive getter | Badge text. Passed as the first argument. |
value | string | Fallback label if label is missing. |
variant | 'default' | 'secondary' | 'outline' | 'destructive' | Visual variant. |
icon, iconComponent, startIcon, startIconComponent | icon | Leading icon. |
endIcon, endIconComponent | icon | Trailing icon. |
iconPosition | 'start' | 'end' | Moves the primary icon to the end when set to end. |
labelClassName | string | Label span class. |
iconClassName, startIconClassName, endIconClassName | string | Icon slot classes. |
Was this page helpful?
