Badge
Display notification counts
Demo
API
Tag
Name | Type | Content | |||||||
---|---|---|---|---|---|---|---|---|---|
m-badge |
Custom tag | Text or the count attribute |
Attributes
Name | Value | Description | |||||||
---|---|---|---|---|---|---|---|---|---|
count |
Number | A number to display. When zero or empty the badge will hide itself. |
Guidelines
Badge hides itself
Badge can be used to display a count or text. If either is omitted, the badge will be set to display: none
.
Localization
Localize the count value before setting it.
Accessibility
Use aria-labelledby
or aria-label
to provide context for the count.