Badge

Display an indicator that requires attention.

General

Show number or text.

Type

Express state in different colors.

Custom color

For more colors, please refer to the color section.

Pulse

Use pulse for a live status. The ring follows the badge color and stops when the user prefers reduced motion.

Anchor

Fix the Badge in the designated position.

APIs

Badge.Props

AttributeDescriptionTypeAccepted valuesDefault
typebadge typeBadgeTypesBadgeTypesdefault
dotshow dot and ignore contentboolean-false
pulseanimated ring for live statusboolean-false
ghostoutline variant: opposite colorboolean-false
lightlight variant: tinted backgroundboolean-false
subtlesubtle variant: no backgroundboolean-false
...native propsHTMLAttributes'alt', 'id', 'className', ...-

Badge.Anchor.Props

AttributeDescriptionTypeAccepted valuesDefault
placementfixe position of BadgeAnchorPlacementAnchorPlacementtopRight
...native propsHTMLAttributes'alt', 'id', 'className', ...-

BadgeTypes

type BadgeTypes =
  | 'default'
  | 'primary'
  | 'secondary'
  | 'success'
  | 'warning'
  | 'error'
  | 'info'

AnchorPlacement

type AnchorPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
Edit this page on GitHub