Tag Input

Input for entering multiple unique values as chip-style tokens, with suggestions and keyboard editing.

import { TagInput } from "@plexui/vue/components/TagInput";

Examples

Overview

size
minRows

Inline filter row

size

Suggestions

size

API

PropTypeDefaultDescription
value / v-model:valueTag[]—Controlled value; update:value fires on every change
default-valueTag[]—Uncontrolled initial tags
@change(tags: Tag[]) => void—Fires when the tags change
idstring—Id of the text input, so a label can target it with for
placeholderstring—Input placeholder
validator(value: string) => boolean—Validates each tag when it is created; invalid tags shown in red
max-tagsnumber—Maximum number of tags. At the limit the text input hides and a count shows below; the container then takes the tab stop, so arrow keys and Backspace still select and remove tags
rowsnumber1Min rows
size'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'xlControl height when rows=1; matches Input height of the same size
pillbooleanfalseFully-rounded container and chips; matches Input/SelectControl pill
delimitersstring[][",", " "]Characters that commit the current text as a tag
disabledboolean—Disables the input: tags cannot be added or removed, and pending text stays as typed
auto-focusbooleanfalseFocus on mount

Tag is { value: string; valid: boolean }.

Styling

Tag Input reads these component tokens. Override them at any scope to restyle it:

  • --button-font-weight: font weight (default var(--font-weight-medium))
  • --input-outline-border-color: outline border color (default var(--color-border-primary-outline))
  • --input-outline-border-color-focus: outline border color focus (default var(--alpha-50))
  • --input-text-color: text color (default var(--color-text))