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.

Anchor

Fix the Badge in the designated position.

APIs

Badge.Props

AttributeDescriptionTypeAccepted valuesDefault
typebadge typeBadgeTypesBadgeTypesdefault
dotshow dot and ignore contentboolean-false
...native propsHTMLAttributes'alt', 'id', 'className', ...-

Badge.Anchor.Props

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

BadgeTypes

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

AnchorPlacement

type AnchorPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'