Skip to content
On this page

Badge

A visual indicator for a value or status descriptor for UI elements.

Usage

value

Badge can be used to display text and numbers.

6
new

state

You can define different states.

6
6
6
6

max

You can customize the max value.The default max value is 99, which supports number and string.

6
66

dot

Use a dot to mark content that needs to be noticed.You can use it by setting the dot attribute or not setting the value

Props

NameTypeDefaultDescription
valuestring | numberundefinedDisplay badge content.
colorblue | teal | red | yellow | gray | deepGraytealSet badge color.
maxstring | number99Greater than ${max}, display ${max}+.
dotbooleanfalseOnly a dot style.
hiddenbooleanfalseWhether to display the number 0.

Slots

NameParametersDescription
default()Badge's content.

MIT Licensed