2016-08-23 09:37:10 +08:00
|
|
|
---
|
|
|
|
category: Components
|
2016-11-09 14:43:32 +08:00
|
|
|
type: Data Display
|
2016-09-21 11:28:38 +08:00
|
|
|
title: Tag
|
2020-05-31 11:48:34 +08:00
|
|
|
cover: https://gw.alipayobjects.com/zos/antfincdn/RkyisJo2r%267/Tag.svg
|
2016-08-23 09:37:10 +08:00
|
|
|
---
|
|
|
|
|
2017-09-18 10:27:35 +08:00
|
|
|
Tag for categorizing or markup.
|
2016-08-23 09:37:10 +08:00
|
|
|
|
2016-09-10 13:43:30 +08:00
|
|
|
## When To Use
|
2016-08-23 09:37:10 +08:00
|
|
|
|
|
|
|
- It can be used to tag by dimension or property.
|
|
|
|
|
2017-09-18 10:27:35 +08:00
|
|
|
- When categorizing.
|
2016-08-23 09:37:10 +08:00
|
|
|
|
|
|
|
## API
|
|
|
|
|
2016-11-10 11:14:03 +08:00
|
|
|
### Tag
|
|
|
|
|
2019-11-22 10:34:42 +08:00
|
|
|
| Property | Description | Type | Default |
|
|
|
|
| --- | --- | --- | --- |
|
|
|
|
| afterClose | Callback executed when close animation is completed, please use `onClose`, we will remove this in the next version | () => void | - |
|
|
|
|
| closable | Whether the Tag can be closed | boolean | `false` |
|
|
|
|
| color | Color of the Tag | string | - |
|
|
|
|
| onClose | Callback executed when tag is closed | (e) => void | - |
|
|
|
|
| visible | Whether the Tag is closed or not | boolean | `true` |
|
2020-03-21 12:01:23 +08:00
|
|
|
| icon | Set the icon of tag | ReactNode | - | |
|
2016-11-10 11:14:03 +08:00
|
|
|
|
|
|
|
### Tag.CheckableTag
|
|
|
|
|
2020-01-06 11:13:39 +08:00
|
|
|
| Property | Description | Type | Default |
|
|
|
|
| -------- | ----------------------------------------------- | ----------------- | ------- |
|
|
|
|
| checked | Checked status of Tag | boolean | `false` |
|
|
|
|
| onChange | Callback executed when Tag is checked/unchecked | (checked) => void | - |
|