mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
882cec62d6
* docs: Add components overview page * fix detail * remove ContributorsList form overview page * fix components url * improve code style * remove extra file * fix detail * fix lint * fix lint * docs: Finish components overview page * fix lint * docs: Update cover * fix lint * update cover * update menu * improve overview page * refactor code * fix order * update title * add components count * fix overview page ssr bug * move less file * update title margin Co-authored-by: arvinxx <arvinx@foxmail.com>
1.2 KiB
1.2 KiB
category | type | title | cover |
---|---|---|---|
Components | Data Display | Badge | https://gw.alipayobjects.com/zos/antfincdn/6%26GF9WHwvY/Badge.svg |
Small numerical value or status descriptor for UI elements.
When To Use
Badge normally appears in proximity to notifications or user avatars with eye-catching appeal, typically displaying unread messages count.
API
<Badge count={5}>
<a href="#" className="head-example" />
</Badge>
<Badge count={5} />
Property | Description | Type | Default | Version |
---|---|---|---|---|
color | Customize Badge dot color | string | - | |
count | Number to show in badge | ReactNode | ||
dot | Whether to display a red dot instead of count |
boolean | false |
|
offset | set offset of the badge dot, like[x, y] |
[number, number] |
- | |
overflowCount | Max count to show | number | 99 | |
showZero | Whether to show badge when count is zero |
boolean | false |
|
status | Set Badge as a status dot | success | processing | default | error | warning |
'' |
|
text | If status is set, text sets the display text of the status dot |
string | '' |
|
title | Text to show when hovering over the badge | string | count |