Thrive Design System

Components

Badge

A versatile badge component for displaying status, categories, or metadata

Components

Badge

A versatile badge component for displaying status, categories, or metadata

Overview

A versatile badge component for displaying status, categories, or metadata. Built with accessibility in mind and supporting various visual styles.

When to Use

Use badges to highlight status, categorize content, or display compact metadata. They work well inline with text or as standalone elements.

Basic Usage

Default Badge

Simple badge with default styling

New
<Badge>New</Badge>

Variants

Badge Variants

Different semantic variants for different purposes

Default
Success
Warning
Info
Destructive
<div className="flex flex-wrap items-center gap-2">
<Badge variant="normal">Default</Badge>
<Badge variant="success">Success</Badge>
<Badge variant="warning">Warning</Badge>
<Badge variant="info">Info</Badge>
<Badge variant="destructive">Destructive</Badge>
</div>

Sizes

Badge Sizes

Two size options for different contexts

Small
Medium
<div className="flex items-center gap-4">
<Badge size="sm">Small</Badge>
<Badge size="md">Medium</Badge>
</div>

With Icons

Icon Badges

Add icons to the left or right of badge text

Completed
Warning
Information
Failed
Featured
<div className="flex flex-wrap items-center gap-3">
<Badge variant="success" leftIcon={<MdCheck className="h-3 w-3" />}>
  Completed
</Badge>
<Badge variant="warning" leftIcon={<MdWarning className="h-3 w-3" />}>
  Warning
</Badge>
<Badge variant="info" leftIcon={<MdInfo className="h-3 w-3" />}>
  Information
</Badge>
<Badge variant="destructive" leftIcon={<MdClose className="h-3 w-3" />}>
  Failed
</Badge>
<Badge variant="normal" rightIcon={<MdStar className="h-3 w-3" />}>
  Featured
</Badge>
</div>

Status Indicators

Task Status

Common status patterns for tasks and workflows

Contacted
Lead
Qualified
Converted
<div className="flex gap-2">
<Badge variant="normal">Contacted</Badge>
<Badge variant="info">Lead</Badge>
<Badge variant="warning">Qualified</Badge>
<Badge variant="success">Converted</Badge>
</div>

Priority Levels

Priority Badges

Display priority or importance levels

High
Medium
Low
<div className="flex gap-2">
<Badge variant="destructive" size="sm">High</Badge>
<Badge variant="warning" size="sm">Medium</Badge>
<Badge variant="normal" size="sm">Low</Badge>
</div>

User Roles

Role Badges

Display user roles or permissions

Admin
Editor
Viewer
<div className="flex gap-2">
<Badge variant="success">Admin</Badge>
<Badge variant="info">Editor</Badge>
<Badge variant="normal">Viewer</Badge>
</div>

Notification Badges

System Notifications

Badges with icons for system feedback

Email Delivery Complete
Email Delivery Pending
Email Delivery Failed
<div className="flex flex-col gap-2">
<Badge variant="success" leftIcon={<MdCheck className="h-3 w-3" />}>
  Email Delivery Complete
</Badge>
<Badge variant="warning" leftIcon={<MdWarning className="h-3 w-3" />}>
  Email Delivery Pending
</Badge>
<Badge variant="destructive" leftIcon={<MdClose className="h-3 w-3" />}>
  Email Delivery Failed
</Badge>
</div>

Interactive Badges

Removable Tags

Badges that can be dismissed or removed

Contacted
Lead
Qualified
<div className="flex flex-wrap gap-2">
<Badge
  variant="normal"
  rightIcon={<MdClose className="h-3 w-3 cursor-pointer hover:text-ink-dark" />}
  className="cursor-default hover:bg-muted"
>
  Contacted
</Badge>
<Badge
  variant="success"
  rightIcon={<MdClose className="h-3 w-3 cursor-pointer hover:text-ink-dark" />}
  className="cursor-default hover:bg-green-200"
>
  Lead
</Badge>
<Badge
  variant="info"
  rightIcon={<MdClose className="h-3 w-3 cursor-pointer hover:text-ink-dark" />}
  className="cursor-default hover:bg-blue-200"
>
  Qualified
</Badge>
</div>

Best Practices

Use semantic variants

Choose badge variants that match the meaning of the content (success for completed, warning for attention needed, etc.).

Keep text concise

Badge text should be short and scannable. Use 1-2 words when possible.

Use consistent sizing

Stick to one badge size within a component or section for visual consistency.

Don't use as buttons

Badges are for display only. If you need an interactive element, use a button or chip component instead.

Don't overuse colors

Too many colored badges in one view creates visual noise. Use neutral badges for less important information.

Don't use long text

Avoid lengthy text in badges. If you need more space, consider using a different component.

Props

Props

Accessibility

Color and Meaning

Don't rely solely on color to convey meaning. Use icons or text to reinforce the badge's purpose.

  • Ensure sufficient color contrast between badge background and text
  • Don't rely solely on color to convey meaning
  • Use icons in addition to color for better comprehension
  • Provide appropriate ARIA labels for icon-only badges
  • Make sure interactive badges have proper keyboard navigation