Badge

Attach status, count, or short metadata to nearby content.

Badge

Default

Typically displaying unread messages count. You can use it on buttons,text,avatars,etc.

Code copied

Max Value

Set max prop to handle overflow situation.

The max value is defined by property max which is a Number. Note that it only works when value is also a Number.

Code copied

Customizing content

Displays text content other than numbers.

When value is a String, it can display customized text.

Code copied

Red Dot

Use a red dot to mark content that needs to be noticed.

Use the attribute is-dot. It is a Boolean.

Code copied

Offset

Set offset of the badge dot, the format is [left, top], which represents the offset of the status dot from the left and top of the default position.

Code copied

Processing

Use processing for live or updating states. It adds a repeating pulse around the badge; compare it with the normal state below.

Code copied

Controlled visibility

Set hidden prop to control the visibility of the badge.

Code copied

Show Zero

Set show-zero prop to display zero.According to reason, it is hidden.

Code copied

API

PROPS

PropertyTypeValuesDescriptiondefaultExampleMore
valueNumber/StringNumberStringdisplay value.' '
Usage
maxNumberNumbermaximum value, shows {max}+ when exceeded. Only works if value is a number.
Usage
is-dotBooleantruefalseShow with little dots level.
Usage
hiddenBooleantruefalsehidden badge.
Usage
typeStringprimarysuccesswarninfodangerbadge type.danger
Usage
show-zeroBooleantruefalseWhether to show badge when value is zero.true
Usage
colorStringStringbackground color of the dot.
Usage
offsetArrayRecord< numbernumber>Adjusting the position of the badge
Usage
processingBooleantruefalseSet processing prop to indicate it is processing.
Usage
badge-styleobjectCSSPropertiescustom style of badge.
badge-classStringStringcustom class of badge.
No matching data

SLOTS

PropertyTypeValuesDescriptiondefaultExampleMore
defaultslotcustomize default content
Usage
No matching data
Last Updated: 2026-08-17, 08:33:54