Badge
Default
Default color for badge is primary
.
Content
Use the prop content
to pass numeric values, if you want to use other data different than a number use the slot content
instead.
v-model support
You can use v-model to control hiding/showing the badge.
Color
You can use the color
prop to change the badge color.
Dot
Use the prop dot
to transform the badge into a dot.
Anchor origin
Change the position of the badge by passing top/bottom
and left/right
values to the anchor
prop.
Max
Change the max
prop to cap the numeric value of the content.
Overlap
Use overlap
prop to adjust the position of the badge, if you need more refined adjustments you can use the offsetX
or offsetY
props.
By default overlap
prop is true
.
Roundness
You can adjust badge roundness using border-radius utilities.
Sizing
You can use font-size utility to adjust the size of badge.
API
Show/Hide badge based on v-model value
Sets badge color
Sets the badge position
Converts badge to a dot
Adds badge border
Adjusts position of badge
Sets offset on x-axis
Sets offset on y-axis
Use to pass numeric values
Sets the highest possible value