tags-input

Tags Input

An underlined field that collects several short values as removable tags, such as materials or interests; joins a Field around it.

Parts

PartFileDoes
TagsInputTagsInput.vueGroups all parts of the tags input, where the user enters several short values.
TagsInputInputTagsInputInput.vueLets the user type a new tag and add it to the tags input.
TagsInputItemTagsInputItem.vueGroups the text and delete button of one tag.
TagsInputItemDeleteTagsInputItemDelete.vueLets the user remove its tag.
TagsInputItemTextTagsInputItemText.vueShows the value of one tag.

Anatomy

<TagsInput>
  <TagsInputItem>
    <TagsInputItemText />
    <TagsInputItemDelete />
  </TagsInputItem>
  <TagsInputInput />
</TagsInput>

Styling

All of Tags Input’s styles live in tags-input.json. New to styling in Frontic UI? How styling works →

Install

Installs with it
use-field-control
npm packages
@lucide/vue
@vueuse/core
reka-ui

API reference

TagsInput.vue

Groups all parts of the tags input, where the user enters several short values.

Props 18

PropTypeDefault
modelValueAcceptableInputValue[] | null—
defaultValueAcceptableInputValue[]—
addOnPastebooleanfalse
addOnTabbooleanfalse
addOnBlurbooleanfalse
duplicatebooleanfalse
disabledbooleanfalse
delimiterstring | RegExp','
dirDirection—
maxnumber0
idstring—
convertValue((value: string) => AcceptableInputValue)—
displayValue((value: AcceptableInputValue) => string)—
asChildbooleanfalse
asAsTag | Component—
namestring—
requiredbooleanfalse
classClassValue—

Events 4

EventPayload
update:modelValuepayload: AcceptableInputValue[]
invalidpayload: AcceptableInputValue
addTagpayload: AcceptableInputValue
removeTagpayload: AcceptableInputValue

Slots 1

SlotSlot props
default{ modelValue: AcceptableInputValue[]; }

Recipe tags-input 1 group

TagsInputInput.vue

TagsInputItem.vue

TagsInputItemDelete.vue

TagsInputItemText.vue
Tags Input
State