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

35 lines
942 B
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/alicdn/cH1BOLfxC/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
2021-03-01 19:20:48 +08:00
| Property | Description | Type | Default | Version |
| --- | --- | --- | --- | --- |
| closable | Whether the Tag can be closed | boolean | false | |
| closeIcon | Custom close icon | ReactNode | - | 4.4.0 |
| color | Color of the Tag | string | - | |
| icon | Set the icon of tag | ReactNode | - | |
| visible | Whether the Tag is closed or not | boolean | true | |
| onClose | Callback executed when tag is closed | (e) => void | - | |
2016-11-10 11:14:03 +08:00
### Tag.CheckableTag
2021-03-01 19:20:48 +08:00
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| checked | Checked status of Tag | boolean | false |
| onChange | Callback executed when Tag is checked/unchecked | (checked) => void | - |