<badge>
A small count or dot pinned to the corner of an icon or any other element.
<row style="gap-32 items-center">
<badge count="3">
<icon name="mail size-28"/>
</badge>
<badge count="12"
color="teal">
<icon name="shopping_cart size-28"/>
</badge>
<badge>
<icon name="notifications size-28"/>
</badge>
</row>
Attributes
| Name | What it does | Default |
|---|---|---|
color |
Badge background color color |
red |
count |
Badge label/count text. A count of 0 hides the badge unless show-zero. string |
|
show-zero |
Keep the badge (showing 0) when the count is 0. boolean |
false |
size |
Badge size number |
18 |
Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.