Skip to content

TagsInput ​

Overview ​

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

Theme entry: TagsInput

Props ​

NameTypeRequiredDefaultDescription
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
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.
convertValuefuncundefinedConverts an entered string to the tag value, before the duplicate check runs.
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