Badge
A visual indicator for a value or status descriptor for UI elements.
Usage
value
Badge can be used to display text and numbers.
state
You can define different states.
max
You can customize the max value.The default max value is 99, which supports number and string.
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
Name | Type | Default | Description |
---|---|---|---|
value | string | number | undefined | Display badge content. |
color | blue | teal | red | yellow | gray | deepGray | teal | Set badge color. |
max | string | number | 99 | Greater than ${max} , display ${max}+ . |
dot | boolean | false | Only a dot style. |
hidden | boolean | false | Whether to display the number 0. |
Slots
Name | Parameters | Description |
---|---|---|
default | () | Badge's content. |