Skip to content

Tags Input ​

Tag chips with an inline input. Enter or the delimiter adds a tag, Backspace in the empty input removes the last one; chips wrap onto new lines.

Usage ​

Approximate web preview — the HarmonyOS rendering is the reference.

Max, delimiter & disabled ​

Approximate web preview — the HarmonyOS rendering is the reference.

API ​

Extracted from the @Param / @Event / @BuilderParam declarations in the library sources.

STagsInput ​

shadcn-vue TagsInput: chips (h-5 rounded-md bg-secondary, text + x) and an inline input in one bordered field (flex flex-wrap gap-2 items-center rounded-md border px-2 py-1), with the v4 focus ring.

Enter or the delimiter (default ,) adds the typed text; Backspace in the empty input removes the last tag; the x on a chip removes it. Duplicates are ignored. Chips wrap onto new lines.

PropTypeDefaultDescription
value!!string[] | undefinedundefinedControlled tags (use with !!). Leave undefined for uncontrolled.
defaultValuestring[][]
placeholderResourceStr''
maxnumber0Maximum number of tags (0 = unlimited).
delimiterstring','
allowDuplicatesbooleanfalse
disabledbooleanfalse
invalidbooleanfalse
labelstring | undefinedundefinedAccessible name when there is no visible label.
EventTypeDefaultDescription
onValueChange(v: string[]) => void() => { }

MIT Licensed