Badge

Badges show notifications, counts, or status information. They are compact and discreet — designed to be minimal and non-intrusive.

Usage

The Badge component wraps around its content and remains as is, regardless of its enclosing container.

import { Badge } from "@smartacteam/ui/badge";
<Badge variant="outline">Badge</Badge>

Basics

A badge is a static visual label or indicator used to convey status or highlight content.


Primary

The Primary Badge is designed to emphasize small details or draw attention to key information, without implying a sense of urgency. It can include an icon that relates to its context.

Primary (default)

  • A Primary Badge has a solid background with base-tertiary assigned to it.
  • It has base-foreground assigned to its icon & text.

Secondary

The Secondary Badge is designed to bring more color to emphasize small details or draw attention to key information, without implying a sense of urgency. It can include an icon that relates to its context.

  • A Secondary Badge has a solid background with base-accent assigned to it.
  • It has base-accent-foreground assigned to its icon & text.

Outline

  • A Outline Badge has a transparent background with base-tertiary assigned to its border color.
  • It has base-foreground assigned to its icon & text.

Confirmation

A Confirmation Badge is a type of badge used to indicate a positive, confirmation, or completed action. It can include an icon such as a checkmark, a check circle icon, or other symbols commonly associated with confirmation.

Confirmation

  • A Confirmation Badge has a solid background with base-confirmation assigned to it.
  • It has base-confirmation-foreground assigned to its icon & text.

Confirmation Outline

  • A Confirmation Outline Badge has a transparent background with base-confirmation assigned to its border color.
  • It has base-foreground assigned to its icon & text.

Warning

A Warning Badge is a type of badge used to convey caution or alert users about potential issues that require attention but may not necessarily be critical or error-related. It can include an icon such as an exclamation mark, triangle, or other symbols commonly associated with warnings.

Warning

  • A Warning Badge has a solid background with base-warning assigned to it.
  • It has base-warning-foreground assigned to its icon & text.

Warning Outline

  • A Warning Outline Badge has a transparent background with base-warning assigned to its border color.
  • It has base-foreground assigned to its icon & text.

Destructive

A Destructive Badge is a notification designed to convey a critical issue that requires immediate attention or action. It can include an icon such as an exclamation mark, a stop sign, or other symbols commonly associated with errors.

Destructive

  • A Destructive Badge has a solid background with base-destructive assigned to it.
  • It has base-destructive-foreground assigned to its icon & text.

Destructive Outline

  • A Destructive Badge Outline Badge has a transparent background with base-destructive assigned to its border color.
  • It has base-foreground assigned to its icon & text.