Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sure-developer.com/llms.txt

Use this file to discover all available pages before exploring further.

Badge

Badge renders a compact status label. It supports text icons and Iconify icon specs.
ui.badge('Ready', {
  iconComponent = 'lucide:check',
  variant = 'secondary'
})

API

ui.badge(label, props?)

Props

PropTypeDescription
labelstring | reactive getterBadge text. Passed as the first argument.
valuestringFallback label if label is missing.
variant'default' | 'secondary' | 'outline' | 'destructive'Visual variant.
icon, iconComponent, startIcon, startIconComponenticonLeading icon.
endIcon, endIconComponenticonTrailing icon.
iconPosition'start' | 'end'Moves the primary icon to the end when set to end.
labelClassNamestringLabel span class.
iconClassName, startIconClassName, endIconClassNamestringIcon slot classes.