# Badge A number or status mark on buttons and icons. ## Basic Usage Set the `value` attribute, the badge will be displayed in the upper right corner of the element. ```html Button ``` ## Maximum Value Set the `max` attribute, when the value exceeds the maximum value, it will be displayed as 'max+'. ```html Button ``` ## Custom Content Set the `value` attribute to a string type to display custom content. ```html Button ``` ## Dot Badge Set the `is-dot` attribute to display a small red dot without specific content. ```html Button ``` ## Custom Badge Color Set the `type` attribute to change the badge color, supporting `primary` / `success` / `warning` / `danger` / `info`, default is `danger`. ```html Danger Primary Success Warning Info ``` ## Independent Display When the badge is used independently, the badge will be centered. ```html ``` ## Attributes | Attribute | Description | Type | Default | Version | |---------|---------|---------|---------|------| | value | Display value | string / number | - | - | | max | Maximum value, only valid when value is a number | number | - | - | | top | Distance from the top of the badge to the top of the container | string | - | - | | right | Distance from the right of the badge to the right of the container | string | - | - | | is-dot | Whether to display a small dot | boolean | false | - | | hidden | Whether to hide the badge | boolean | false | - | | type | Badge type | string | danger | - | | bg-color | Custom badge background color | string | - | - | ## External Style Classes | Class Name | Description | |---------|------| | custom-class | Root node custom class |