Skip to main content

Tag

Tag for categorizing or markup.

When To Use#

  • It can be used to tag by dimension or property.
  • When categorizing.

Examples#

import { Tag } from 'tailor-ui';

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#

PropertyDescriptionTypeDefault
closableWhether the Tag can be closedboolean
editableCan update value when click tagboolean
onClosedCallback executed when close animation is completed() => void
canCloseTrigger when tag close button is clicked, return true to close tag() => boolean | () => Promise<boolean>
onChangeCallback executed when Tag is edited(previousValue: string, value: string) => void
initialEditingInitial edit status for tagboolean
invalidshow invalid border for tagboolean
prefixPrefix of tagReactNode