Skip to Content

Badge

A static visual indicator which can be used to represent numeric values, statuses, labels.

Badge

Usage

Sizes

Defaults to sm size.

Small
Medium

Radius

  • none: No border radius.
  • sm: Small border radius.
  • md: Medium border radius.
  • lg: Large border radius.
  • full: Fully rounded border radius.

Defaults to sm radius.

Full
Large
Medium
Small
None

Variants (and Colors)

Defaults to solid variant and main color.

Solid

Main
Sub
Neutral
Critical
Success
Warning

Subtle

Main
Sub
Neutral
Critical
Success
Warning

Outline

Main
Sub
Neutral
Critical
Success
Warning

Dot

Main
Sub
Neutral
Critical
Success
Warning

Start & End Content

Chip
Badge

With Close Button

If you pass the onClose prop, the close button will be visible. You can override the close icon by passing the endContent prop.

Badge
Badge

Slots

  • base: The base slot of the badge, it is the container of the badge.
  • content: The content slot of the badge, it is the container of the badge children.
  • dot: Small dot on the left side of the badge. It is visible when the variant=dot prop is passed.
  • closeButton: Close button classes of the badge. It is visible when the onClose prop is passed.

Custom Styles

You can customize the Badge component by passing custom Tailwind CSS classes to the component slots.

New