Badge
Overview
Usage
Examples
API
A badge is a small count or status marker pinned to the corner of another element. [rhombusBadge] is an attribute directive that composes Angular Material's [matBadge] via hostDirectives and routes its colours through the token contract per variant — toggle the theme above and the badges re-skin without touching markup.
Example
When to use
- Use a badge to draw attention to a count or short status on its host — an unread tally on an inbox button, a "NEW" flag on an icon.
- When the marker belongs to another element (button,
mat-icon, span) rather than standing on its own, so it should be pinned to that host's corner.
When not to use
Related components
Was this page helpful?