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.

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.

Customizing content

Displays text content other than numbers.

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

Red Dot

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

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

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.

Processing

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

Controlled visibility

Set hidden prop to control the visibility of the badge.

Show Zero

Zero values are shown by default. Set show-zero="false" to hide the badge while keeping its child content.

API

PROPS

Property
Type
Values
Description
default
Example
More
value
Number/String
NumberString
display value.
' '
max
Number
Number
maximum value, shows {max}+ when exceeded. Only works if value is a number.
—
is-dot
Boolean
truefalse
Show with little dots level.
false
hidden
Boolean
truefalse
hidden badge.
false
type
String
primarysuccesswarninfodanger
badge type.
danger
show-zero
Boolean
truefalse
Whether to show badge when value is zero.
true
color
String
String
background color of the dot.
—
offset
Array
Record< numbernumber>
Adjusting the position of the badge
—
processing
Boolean
truefalse
Set processing prop to indicate it is processing.
false
badge-style
object
CSSProperties
custom style of badge.
—
—
badge-class
String
String
custom class of badge.
—
—

SLOTS

Slot
Description
default
Example
More
default
customize default content
—
Last Updated: 2026-10-28, 06:17:56 UTC
Copied