Skip to content

InputTags ​

Free-text tags

For labels the user makes up: keywords, topics, addresses to invite. When the values come from a known list, use Combobox or a multiple Select instead, so nobody types a tag that doesn't exist.

Basic
  • anime
  • 2015
[ "anime", "2015" ]
  • separators takes keys (Enter) and characters (,). Characters also split a paste and work on phone keyboards, which don't report the comma key.
  • Backspace in an empty draft removes the last tag. Adds and removes are announced to screen readers.
  • max stops adding at that many; duplicates allows the same tag twice.
  • Inside a Field the field's label names it; alone, pass label. name submits one value per tag, like a multiple select.

Usage ​

ts
import { BlessInputTags } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
idstring—
placeholderstring—
namestring—submitted with the form, one value per tag
separatorsstring[]["Enter", ","]keys (Enter) or characters (,) that commit the draft; characters also split a paste
maxnumber—
disabledboolean—
invalidboolean—
labelstring—
duplicatesboolean—allow the same tag twice
modelValuestring[][]

Events

NamePayloadDescription
update:modelValue[value: string[]]

Released under the MIT License. Character names and artwork belong to their owners.