<vega-counter-badge
color="bg-danger|bg-action"
dot="false"
count="9"
>
<vega-button>Button Example</vega-button>
</vega-counter-badge>
document.querySelector('vega-counter-badge').offset = [
5,0
];
<vega-counter-badge
color="bg-danger|bg-action"
dot="true"
count="9"
>
<vega-button>Button Example</vega-button>
</vega-counter-badge>
The counter badge is a specific type of badge to show the increment of items.
It may be used for notifications, shopping carts, or other badges where more than one item is represented.
Counter badges have two types:
Name | Description | Default |
---|---|---|
color | Customize the Badge color. Currently only supports bg-danger and bg-action |
bg-danger |
dot | Display a dot badge if set to be true. This provides no specific count. boolean | false |
count | Number to show in badge number |
0 |
offset | Set offset [left, top] of the badge from it’s default position on the top right cornerarray |
0,0 |