Skip to main content
Badge component preview (light)
  • Location: sabo/src/components/ui/badge.tsx

When to use

  • Short labels for statuses, categories, counts, or “new”.
  • Avoid full sentences; keep text concise.

Usage

sabo/src/components/ui/badge.tsx

Key props

variant
string
default | secondary | outline | destructive
asChild
boolean
Render as child (e.g., anchor) while keeping Badge styles.

Styling tip

  • Badges are small—avoid wrapping. Use whitespace-nowrap for dynamic text.
  • Use semantic colors for status (success/warning/error).

Accessibility

  • Include a text label that conveys meaning (“Error”, “Beta”).