Props
| Name | Description |
|---|---|
append:icon Type: string | Name of the icon to be added at the end of the input. |
autocomplete Type: stringDefault"off" | Guides to the browser as to the type of information expected in the field. |
autofocus Type: Booleanish | Focuses the field when it mounts (a dialog already open included), unless the user is typing in another field. |
caseSensitive Type: booleanDefaultfalse | Compares tags case-sensitively when rejecting duplicates ( Restores v2 matching. By default v3 folds case, so |
clearable Type: booleanDefaultfalse | Displays a clear button when the input has a value and is being interacted with. Empties the whole field, not one chip. In |
comma Type: booleanDefaultfalse | Sets the display model for selected values to a list of comma separated string. In this mode the user cannot deselect an option by pressing the close button. A display mode: the tags render as one comma-separated string and lose their individual close buttons. Use it where the set is set-and-forget, never where people prune a list. See example |
compact Type: booleanDefaultfalse | Compact density: the field uses the A property of a screen rather than of a field. Two densities in one form is a visible seam. See example |
description Type: string | Text between the label and the input. Unlike the hint it is always visible; it joins the input's |
disabled Type: booleanDefaultfalse | Disables the component. Leaves the tab order entirely, chips included. Prefer |
divider Type: string | string[]Default"Enter" | The divider key used to separate values from one another. By default it is "Enter". Accepts a single key or an array of keys (e.g. A single-character divider also splits text that already contains it, so a pasted |
errors Type: string | string[] | Error messages under the field, a string or array, in an The channel for a rule the component does not enforce — "at least three tags", a value your server rejected. A refused duplicate or a capped entry is better placed in |
formless Type: booleanDefaultfalse | Keep this control out of the enclosing For a tags field inside a |
hasErrors Type: booleanDefaultfalse | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
hasWarnings Type: booleanDefaultfalse | Define if the component should be in a warning state. Same chrome as errors with |
hideLabel Type: booleanDefaultfalse | Visually hides the label of the input while maintaining accessibility. |
hint Type: string | Text box to be displayed near the input, usually to indicate instructions. |
id Type: string | The |
inputAlign Type: FieldCrossAlign | Vertical position of the control in a side-by-side row; not |
label requiredType: string | Text content of the label of the element. |
labelAlign Type: FieldCrossAlign | Vertical position of the label block in a side-by-side row; not |
labelMode Type: "outside" | "floating" | "inside" | Where the label sits relative to the field: All three modes work here, unlike on |
labelPosition Type: "left" | "center" | "right" | Sets the text alignment of the label. |
layout Type: Responsive<FieldLayout> | How label and input sit together: Applies only while the resolved label mode is |
loading Type: booleanDefaultfalse | Sets the component in a loading state, usually triggering some visual styles. A status light, not a lock: the field stays editable while it shows. Guard the value yourself if a server-side check has to settle first. See example |
max Type: number | Maximum number of selected items. Checked against |
modelValue Type: string[] | Used by v-model. Contains all selected tags. |
name Type: string | Defines the name of the input. |
persistentHint Type: booleanDefaultfalse | Keeps the hint displayed. |
placeholder Type: string | Text shown while the field is empty. |
prepend:icon Type: string | Name of the icon to be added at the start of the input. |
pt Type: (PtMap<TextControlPtPart, FormControlPtState> & { "badge:loading"?: PtValue | undefined; "badge:disabled"?: PtValue | undefined; "badge:errors"?: PtValue | undefined; "badge:warnings"?: PtValue | undefined; "badge:readonly"?: PtValue | undefined; "badge:hasValue"?: PtValue | undefined; "comma:loading"?: PtValue | undefined; "comma:disabled"?: PtValue | undefined; "comma:errors"?: PtValue | undefined; "comma:warnings"?: PtValue | undefined; "comma:readonly"?: PtValue | undefined; "comma:hasValue"?: PtValue | undefined; "badge:highlighted"?: PtValue | undefined; "comma:highlighted"?: PtValue | undefined; } & { badge?: PtValue | PtItemFn<string, BbTagPtState> | undefined; comma?: PtValue | PtItemFn<string, BbTagPtState> | undefined; } & { "root:outline"?: PtValue | undefined; "icon:outline"?: PtValue | undefined; "root:secondary"?: PtValue | undefined; "icon:secondary"?: PtValue | undefined; "spinner:outline"?: PtValue | undefined; "spinner:secondary"?: PtValue | undefined; "clear:outline"?: PtValue | undefined; "clear:secondary"?: PtValue | undefined; "root:ghost"?: PtValue | undefined; "icon:ghost"?: PtValue | undefined; "spinner:ghost"?: PtValue | undefined; "clear:ghost"?: PtValue | undefined; "label:outline"?: PtValue | undefined; "label:secondary"?: PtValue | undefined; "label:ghost"?: PtValue | undefined; "description:outline"?: PtValue | undefined; "description:secondary"?: PtValue | undefined; "description:ghost"?: PtValue | undefined; "message:outline"?: PtValue | undefined; "message:secondary"?: PtValue | undefined; "message:ghost"?: PtValue | undefined; "hint:outline"?: PtValue | undefined; "hint:secondary"?: PtValue | undefined; "hint:ghost"?: PtValue | undefined; "input:outline"?: PtValue | undefined; "input:secondary"?: PtValue | undefined; "input:ghost"?: PtValue | undefined; "box:outline"?: PtValue | undefined; "box:secondary"?: PtValue | undefined; "box:ghost"?: PtValue | undefined; "prefix:outline"?: PtValue | undefined; "prefix:secondary"?: PtValue | undefined; "prefix:ghost"?: PtValue | undefined; "suffix:outline"?: PtValue | undefined; "suffix:secondary"?: PtValue | undefined; "suffix:ghost"?: PtValue | undefined; }) | Passthrough, object form: the same keys as the |
pt:<part> Type: PtValue | ((ctx: PtItemCtx<string, BbTagPtState>) => PtItemResult) | Passthrough, attribute form: one attribute per part, Each chip is |
readonly Type: booleanDefaultfalse | Sets the input in a readonly state. Locks this input field. It is not a way to render tags elsewhere in the interface — a table cell or a card wants |
required Type: booleanDefaultfalse | Sets the input as required. Satisfied by the first tag: the underlying input drops its |
reverse Type: booleanDefaultfalse | Reverses the layout. Applicable in every direction the order of the label and the input is swapped. |
rules Type: RuleExpression<string[]> | vee-validate rules for this field. Only inside a Validates the whole array as one value, so a function over it covers a minimum or a maximum: |
validationLabel Type: string | The field's name in validation messages ( |
validationMode Type: ValidationMode | When the field validates: |
variant Type: InputVariantTypeDefault'outline' | The field box's look, with The field box only: |
warnings Type: string | string[] | Warning messages under the field, a string or array: amber, in their own |
v-model
Values kept in sync through v-model.
| Name | Description |
|---|---|
modelValue Type: string[] | Strictly |
Events
| Name | Description |
|---|---|
active Type: (): void | Emitted when the tag input becomes active (focus/click enters it). |
blur Type: (event: FocusEvent): void | Emitted when the native input loses focus. Forwards the original DOM |
change Type: (event: Event): void | Emitted when the native input fires a change event. Forwards the original DOM |
click Type: (event: MouseEvent): void | Emitted when the input receives a click interaction. Forwards the original DOM |
compositionend Type: (event: CompositionEvent): void | An IME composition ended. Forwards the DOM |
compositionstart Type: (event: CompositionEvent): void | An IME composition started. Forwards the DOM |
duplicate Type: (string: string): void | Emitted when an attempt is made to add a tag that already exists. Carries the rejected string. Nothing is shown to the user unless you show it — the component refuses the entry and says nothing on screen. See example |
focus Type: (event: FocusEvent): void | Emitted when the native input gains focus. Forwards the original DOM |
inactive Type: (): void | Emitted when focus/click moves outside the tag input after it was active. |
input Type: (event: Event): void | Emitted on native input events. Forwards the original DOM |
keydown Type: (event: KeyboardEvent): void | Emitted for keyboard interaction. Forwards the original DOM |
keyup Type: (event: KeyboardEvent): void | Emitted when a key is released. Forwards the original DOM |
max Type: (string: string): void | Emitted when an attempt is made to add a tag while the The cap counterpart of |
mousedown Type: (event: MouseEvent): void | A pointer button was pressed on the text field. Forwards the DOM |
mouseup Type: (event: MouseEvent): void | A pointer button was released on the text field. Forwards the DOM |
paste Type: (event: ClipboardEvent): void | Native clipboard paste. Forwards the DOM |
update:modelValue Type: (value: string[]): void | Emitted when the tag array changes. |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Description |
|---|---|
append Type: Record<string, never> | Content appended inside the input field wrapper, after the tag chips. |
append:outer Type: Record<string, never> | Content appended outside the input field wrapper. |
description Type: BbTagDescriptionSlotProps | Replaces the description text. Provided alone (no |
label Type: BbTagLabelSlotProps | Replaces the default label text rendered above the input. |
prefix Type: Record<string, never> | Content rendered as an inline prefix inside the input field. |
prepend Type: Record<string, never> | Content prepended inside the input field wrapper, before the tag chips. |
prepend:outer Type: Record<string, never> | Content prepended outside the input field wrapper. |
suffix Type: Record<string, never> | Content rendered as an inline suffix inside the input field. |
Renamed and removed
Names from v2 and from earlier 3.0 betas that no longer work, and what to write instead.
- slot
append-outerappend:outerfails silently directionlayoutfails silentlyhasWarninghasWarningsfails silentlymultipleremovedfails silently- slot
prepend-outerprepend:outerfails silently pt:itemremovedfails silentlyEach chip is
pt:badge; incommamode each entry ispt:comma(same states)validateOnvalidationModefails silentlyAn array of events became one mode (
aggressive|balanced|lazy|submit-only|submit-live). The old defaults (['blur'],['inactive'], a toggle's['update:modelValue', 'change', 'blur']) arebalanced, the new default: delete the prop. A text field on['update:modelValue']isvalidation-mode="aggressive". Set it once on<BbForm validation-mode>instead of per field.vidremovedfails silentlyA display name (v2:
vid="Email address") is nowvalidation-label; a field path (3.0 betas:vid="address.city") is nowname(brackets for a native post:address[city]).check --fixpicks by the value.