import {MatBadgeModule} from '@angular/material/badge';
MatBadge
Directive to display a text badge.
Selector: [matBadge]
Name | Description |
---|---|
@Input('matBadgeColor')
| The color of the badge. Can be |
@Input('matBadge')
| The content for the badge |
@Input('matBadgeDescription')
| Message used to describe the decorated element via aria-describedby |
@Input('matBadgeHidden')
| Whether the badge is hidden. |
@Input('matBadgeOverlap')
| Whether the badge should overlap its contents or not |
@Input('matBadgePosition')
| Position the badge should reside. Accepts any combination of 'above'|'below' and 'before'|'after' |
@Input('matBadgeSize')
| Size of the badge. Can be 'small', 'medium', or 'large'. |
isAbove | |
---|---|
Whether the badge is above the host or not | |
Returns | |
boolean |
isAfter | |
---|---|
Whether the badge is after the host or not | |
Returns | |
boolean |
MatBadgePosition
Type: 'above after' | 'above before' | 'below before' | 'below after'
MatBadgeSize
Type: 'small' | 'medium' | 'large'