Tag
Tag for categorizing or markup.
When To Use#
- It can be used to tag by dimension or property.
- When categorizing.
Examples#
Basic#
Content
Content
Content
Clickable#
Content
Use prefix#
10
Content
20
Content
Editable#
10
Content
20
Content
Closable#
Content
Content
Content
Content
Use with canClose#
DELETE ME
Add & Remove Dynamically#
tag 1
tag 2
tag 3
API#
| Property | Description | Type | Default |
|---|---|---|---|
closable | Whether the Tag can be closed | boolean | |
editable | Can update value when click tag | boolean | |
onClosed | Callback executed when close animation is completed | () => void | |
canClose | Trigger when tag close button is clicked, return true to close tag | () => boolean | () => Promise<boolean> | |
onChange | Callback executed when Tag is edited | (previousValue: string, value: string) => void | |
initialEditing | Initial edit status for tag | boolean | |
invalid | show invalid border for tag | boolean | |
prefix | Prefix of tag | ReactNode |