Badge

Display

A small label for status, counts, or categories.

Playground

New

Controls

Color variant.

Size.

Pill shape.

Props

PropTypeDefaultDescription
variant'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'outline''default'Color variant.
size'sm' | 'md' | 'lg''md'Size.
roundedbooleanfalsePill shape.

Examples

Default
Default
vue
<DsBadge variant="default">
  Default
</DsBadge>
Primary
Primary
vue
<DsBadge variant="primary">
  Primary
</DsBadge>
Success
Active
vue
<DsBadge variant="success">
  Active
</DsBadge>
Warning
Pending
vue
<DsBadge variant="warning">
  Pending
</DsBadge>
Danger
Error
vue
<DsBadge variant="danger">
  Error
</DsBadge>
Outline
Outline
vue
<DsBadge variant="outline">
  Outline
</DsBadge>
Rounded
Rounded
vue
<DsBadge rounded>
  Rounded
</DsBadge>

Skeleton

Use DsBadgeSkeleton as a loading placeholder while content is being fetched.

Default
vue
<DsBadgeSkeleton />
Small
vue
<DsBadgeSkeleton size="sm" />
Large
vue
<DsBadgeSkeleton size="lg" />

Accessibility

  • Use meaningful text labels.
  • Avoid using color alone to convey information.