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
|
2016-08-23 09:37:10 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
Tag for categorizing or markuping.
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
- categorizing
|
|
|
|
|
|
|
|
## API
|
|
|
|
|
2016-11-10 11:14:03 +08:00
|
|
|
### Tag
|
|
|
|
|
2016-08-23 09:37:10 +08:00
|
|
|
| Property | Description | Type | Default |
|
|
|
|
|--------------|-----------------------|----------|--------------|
|
2016-11-10 10:29:06 +08:00
|
|
|
| color | The background color of Tag | string | - |
|
2016-08-23 09:37:10 +08:00
|
|
|
| closable | Tag can be closed. | boolean | false |
|
2016-11-10 10:29:06 +08:00
|
|
|
| onClose | Callback when tag was closed | (e) => void| - |
|
|
|
|
| afterClose | Callback when closed animation is complete | () => void | - |
|
2016-11-10 11:14:03 +08:00
|
|
|
|
|
|
|
### Tag.CheckableTag
|
|
|
|
|
|
|
|
| Property | Description | Type | Default |
|
|
|
|
|--------------|-----------------------|----------|--------------|
|
|
|
|
| checked | To set the checked status for Tag | boolean | false |
|
|
|
|
| onChange | A callback which will be called while Tag is clicked | (checked) => void | - |
|