Tag

Used for marking and selection.

Basic usage

Use the type attribute to define Tag's type. In addition, the color attribute can be used to set the background color of the Tag.

Tag 1Tag 2Tag 3Tag 4Tag 5

Removable Tag

closable attribute can be used to define a removable tag. It accepts a Boolean. By default the removal of Tag has a fading animation. If you don't want to use it, you can set the disable-transitions attribute, which accepts a Boolean, to true. close event triggers when Tag is removed.

Tag 1Tag 2Tag 3Tag 4Tag 5

Edit Dynamically

You can use the close event to add and remove tag dynamically.

Tag 1Tag 2Tag 3

Tag Input

Enter new item end with comma (,)

Value must contains @


Sizes

Besides default size, Tag component provides three additional sizes for you to choose among different scenarios.

Use attribute size to set additional sizes with large, default or small.

Large
Default
Small
Large
Default
Small

Theme

Tag provide three different themes: darklight and plain

Using effect to change, default is light

Dark

Tag 1
Tag 2
Tag 3
Tag 4
Tag 5
Closable

Light

Tag 1
Tag 2
Tag 3
Tag 4
Tag 5
Closable

Plain

Tag 1
Tag 2
Tag 3
Tag 4
Tag 5
Closable

Rounded

Tag can also be rounded like button.

Tag 1Tag 2Tag 3Tag 4Tag 5
Tag 1Tag 2Tag 3Tag 4Tag 5
Tag 1Tag 2Tag 3Tag 4Tag 5

Attributes

NameDescriptionTypeAccepted ValuesDefault
typecomponent typestringprimary / red / green / blue / teal / orange / yellow
closablewhether Tag can be removedbooleanfalse
disable-transitionswhether to disable animationsbooleanfalse
hitwhether Tag has a highlighted borderbooleanfalse
colorbackground color of the Tagstring
sizetag sizestringlarge / default / smalldefault
effectcomponent themestringdark / light / plainlight
roundwhether Tag is roundedbooleanfalse

Events

NameDescriptionParameters
clicktriggers when Tag is clicked
closetriggers when Tag is removed

Slots

NameDescription
customize default content

CheckTag Attributes

NameDescriptionTypeAccepted ValuesDefault
checkedis checkedbooleantrue / false

CheckTag Events

NameDescriptionParameters
changetriggers when Check Tag is clickedchecked

CheckTag Slots

NameDescription
customize default content

Tag Input Attributes

NameDescriptionTypeAccepted ValuesDefault
v-modelvaluestring[]
commitKeycommit new item when press this keystring, (comma)false
tab-indexmust set >= 0 to show blinking cursornumber0false
placeholdershow when model value is emptystringfalse
validatorfunction to make sure new item has valid formatfunction(value: string) => boolean
sizetag sizestringlarge / default / smalldefault
roundwhether Tag is roundedbooleanfalse

Tag Input Events

NameDescriptionParameters
errortriggers when has error when adding new itemtype: 'none' / 'duplicate' / 'validation' / 'required'
Last Updated: 9/28/2023, 8:58:31 AM
Contributors: Tam Mai