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-06-05 13:50:09 +08:00
|
|
|
cover: https://gw.alipayobjects.com/zos/alicdn/cH1BOLfxC/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
|
|
|
|
|
2022-08-15 14:39:02 +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 | - | |
|
|
|
|
| onClose | Callback executed when tag is closed | (e) => void | - | |
|
2016-11-10 11:14:03 +08:00
|
|
|
|
|
|
|
### Tag.CheckableTag
|
|
|
|
|
2022-08-15 14:39:02 +08:00
|
|
|
| Property | Description | Type | Default |
|
|
|
|
| -------- | ----------------------------------------------- | ----------------- | ------- |
|
|
|
|
| checked | Checked status of Tag | boolean | false |
|
|
|
|
| onChange | Callback executed when Tag is checked/unchecked | (checked) => void | - |
|