Components

Badge

Label and categorize with UiBadge, or show counts with UiBadgeGroup.

UiBadge renders a small status or category label. Group several with UiBadgeGroup.

Add a badge

<template>
  <UiBadge text="New" variant="primary" />
  <UiBadge text="Beta" variant="accent" />
  <UiBadge text="Stable" variant="success" />
</template>

Use tonal and outline variants

<template>
  <UiBadge text="Info" variant="tonal tonal-info" />
  <UiBadge text="Draft" variant="outline" />
</template>

Show a count or initial as a pill

Reserve pill for numbers and single initials — the capsule shape reads best on short, glyph-like content.

<template>
  <UiBadge text="9" variant="danger" pill />
  <UiBadge text="GG" variant="neutral" pill />
</template>
Don't use pill on full-word labels like "Active" or "Pending" — keep those as the default (non-pill) shape.

Props

PropTypeDefaultDescription
textstring | nullBadge label.
variant'primary' | 'secondary' | 'accent' | 'neutral' | 'success' | 'warning' | 'danger' | 'info' | 'gradient' | 'default' | 'outline' | 'tonal tonal-<intent>'Color / style preset.
size'sm'Smaller size (only sm supported).
pillboolean | nullFully rounded capsule (numbers / initials only).
iconCodestring | nullLeading Material Symbols code point.
iconClassstring | string[] | Record<string, boolean> | nullClasses for the icon.
customClassstring | string[] | Record<string, boolean> | nullExtra classes.
Copyright © 2026