Skip to content

TagsInput

Overview

Root of a tags input control allowing users to add and remove tag values.

Theme entry: TagsInput

Props

NameTypeRequiredDefaultDescription
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
classimport('vue').HTMLAttributes['class']undefinedAdditional CSS classes to apply to the root element.
modelValuearrayundefinedThe controlled value of the tags input. Can be bound with v-model.
defaultValuearrayundefinedThe initial value when uncontrolled.
addOnPastebooleanundefinedWhen true, allow adding tags on paste. Works with the delimiter prop.
addOnTabbooleanundefinedWhen true, allow adding tags on Tab keydown.
addOnBlurbooleanundefinedWhen true, allow adding tags on input blur.
duplicatebooleanundefinedWhen true, allow duplicated tags.
disabledbooleanundefinedWhen true, prevents user interaction.
delimiterstring|objectundefinedThe character or regular expression to trigger addition of a new tag. Also used to split tags on paste.
dirstringundefinedThe reading direction of the tags input.
maxnumberundefinedMaximum number of tags.
namestringundefinedThe name submitted with the form.
requiredbooleanundefinedWhen true, the field is required.
asstring|objectundefinedThe HTML element or component to render as.
asChildbooleanundefinedWhether to render as a child element.

Slots

default

Scoped slot.

Events

NameDescription
update:modelValueEmitted when the value changes.
invalidEmitted when an invalid tag entry is attempted.
addTagEmitted when a new tag is added.
removeTagEmitted when a tag is removed.

Full event reference

Source

client/lib/controls/tags-input/TagsInput.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2