mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 20:19:44 +08:00
c430eab79e
* Add icon prop to the tag component * Add test case to the tag component icon prop * Address requested changes * Update tag icon.md for CN * Remove unnecessary warning check
1.1 KiB
1.1 KiB
category | type | title |
---|---|---|
Components | Data Display | Tag |
Tag for categorizing or markup.
When To Use
-
It can be used to tag by dimension or property.
-
When categorizing.
API
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 | - |
Tag.CheckableTag
Property | Description | Type | Default |
---|---|---|---|
checked | Checked status of Tag | boolean | false |
onChange | Callback executed when Tag is checked/unchecked | (checked) => void | - |