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.

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.

Edit Dynamically

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

Tag Input

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.

Theme

Tag provide three different themes: dark、light and plain

Using effect to change, default is light

Rounded

Tag can also be rounded like button.

Attributes

NameDescriptionTypeAccepted ValuesDefault
typecomponent typestringprimary / red / green / blue / teal / orange / yellow—
closablewhether Tag can be removedboolean—false
disable-transitionswhether to disable animationsboolean—false
hitwhether Tag has a highlighted borderboolean—false
colorbackground color of the Tagstring——
sizetag sizestringlarge / default / smalldefault
effectcomponent themestringdark / light / plainlight
roundwhether Tag is roundedboolean—false

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 emptystring—false
validatorfunction to make sure new item has valid formatfunction(value: string) => boolean—
sizetag sizestringlarge / default / smalldefault
roundwhether Tag is roundedboolean—false

Tag Input Events

NameDescriptionParameters
errortriggers when has error when adding new itemtype: 'none' / 'duplicate' / 'validation' / 'required'
Last Updated:
Contributors: Tam Mai