ant-design/components/tag/index.en-US.md

35 lines
1.1 KiB
Markdown
Raw Normal View History

2016-08-23 09:37:10 +08:00
---
category: Components
type: Data Display
2016-09-21 11:28:38 +08:00
title: Tag
cover: https://gw.alipayobjects.com/zos/antfincdn/RkyisJo2r%267/Tag.svg
2016-08-23 09:37:10 +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.
- When categorizing.
2016-08-23 09:37:10 +08:00
## API
2016-11-10 11:14:03 +08:00
### Tag
| 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` |
| 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 | - |