
API#
<nz-badge [nzCount]="5">
<a class="head-example"></a>
</nz-badge>
<nz-badge [nzCount]="5"></nz-badge>
nz-badge#
| Property |
Description |
Type |
Default |
Global Config |
[nzColor] |
Customize Badge dot color |
string |
- |
✅ |
[nzCount] |
Number to show in badge |
number | TemplateRef<void> |
- |
|
[nzDot] |
Whether to display a red dot instead of count |
boolean |
false |
|
[nzShowDot] |
Whether to display the red dot |
boolean |
true |
|
[nzOverflowCount] |
Max count to show |
number |
99 |
✅ |
[nzShowZero] |
Whether to show badge when count is zero |
boolean |
false |
|
[nzStatus] |
Set nz-badge as a status dot |
'success' | 'processing' | 'default' | 'error' | 'warning' |
- |
|
[nzText] |
If nzStatus is set, text sets the display text of the status dot |
string |
- |
|
[nzTitle] |
Text to show when hovering over the badge(Only Non-standalone) |
string |
nzCount |
|
[nzOffset] |
set offset of the badge dot, like[x, y] (Only Non-standalone) |
[number, number] |
- |
|
近期评论