Props
| Name | Type | Default | Description |
|---|---|---|---|
append:icon | string | undefined | - | Name of the icon to be added at the end of the input. |
autocomplete | string | undefined | "off" | Guides to the browser as to the type of information expected in the field. |
autofocus | Booleanish | undefined | - | Sets autofocus on page load. |
caseSensitive | boolean | undefined | false | Compare tags case-sensitively when rejecting duplicates, so Restores v2 matching. By default v3 folds case, so |
clearable | boolean | undefined | false | Displays a clear button when the input has a value and is being interacted with. Empties the whole field, not one chip. In |
comma | boolean | undefined | false | 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 | boolean | undefined | false | Sets the component in a compact mode. A property of a screen rather than of a field. Two densities in one form is a visible seam. See example |
description | string | undefined | - | Descriptive text displayed below the label and above the input. Unlike the hint it is always
visible, and it is linked to the input via |
direction | InputDirection | undefined | - | Direction of the layout of the component. Can either be a predefined value or a
pattern separated by a space like Applies only while the resolved label mode is |
disabled | boolean | undefined | false | Disables the component. Leaves the tab order entirely, chips included. Prefer |
divider | string | string[] | undefined | "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 | string | string[] | undefined | - | Can be a string or an array of string containing the messages to display.
They render 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 |
hasErrors | boolean | undefined | false | Define if the component should be in an error state. It usually attaches a CSS class for styling purposes. |
hasWarnings | boolean | undefined | false | Define if the component should be in a warning state.
Same chrome as errors with |
hideLabel | boolean | undefined | false | Visually hides the label of the input while maintaining accessibility. |
hint | string | undefined | - | Text box to be displayed near the input, usually to indicate instructions. |
id | string | undefined | - | The identifier of the component. |
labelrequired | string | - | Text content of the label of the element. |
labelMode | "outside" | "floating" | "inside" | undefined | - | Where the label sits relative to the field: All three modes work here, unlike on |
labelPosition | "left" | "center" | "right" | undefined | - | Sets the text alignment of the label. |
loading | boolean | undefined | false | 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 | number | undefined | - | Maximum number of selected items. Checked against |
modelValuerequired | string[] | - | Used by v-model. Contains all selected tags. |
name | string | undefined | - | Defines the name of the input. |
persistentHint | boolean | undefined | false | Keeps the hint displayed. |
placeholder | string | undefined | - | String displayed when there's no data. |
prepend:icon | string | undefined | - | Name of the icon to be added at the start of the input. |
pt | PtMap<BbTagPtPart, FormControlPtState> | undefined | - | Passthrough, object form: the same keys as the |
pt:box | PtValue | undefined | - | |
pt:box:disabled | PtValue | undefined | - | |
pt:box:errors | PtValue | undefined | - | |
pt:box:has-value | PtValue | undefined | - | |
pt:box:loading | PtValue | undefined | - | |
pt:box:readonly | PtValue | undefined | - | |
pt:box:warnings | PtValue | undefined | - | |
pt:clear | PtValue | undefined | - | |
pt:clear:disabled | PtValue | undefined | - | |
pt:clear:errors | PtValue | undefined | - | |
pt:clear:has-value | PtValue | undefined | - | |
pt:clear:loading | PtValue | undefined | - | |
pt:clear:readonly | PtValue | undefined | - | |
pt:clear:warnings | PtValue | undefined | - | |
pt:description | PtValue | undefined | - | |
pt:description:disabled | PtValue | undefined | - | |
pt:description:errors | PtValue | undefined | - | |
pt:description:has-value | PtValue | undefined | - | |
pt:description:loading | PtValue | undefined | - | |
pt:description:readonly | PtValue | undefined | - | |
pt:description:warnings | PtValue | undefined | - | |
pt:hint | PtValue | undefined | - | |
pt:hint:disabled | PtValue | undefined | - | |
pt:hint:errors | PtValue | undefined | - | |
pt:hint:has-value | PtValue | undefined | - | |
pt:hint:loading | PtValue | undefined | - | |
pt:hint:readonly | PtValue | undefined | - | |
pt:hint:warnings | PtValue | undefined | - | |
pt:icon | PtValue | undefined | - | |
pt:icon:disabled | PtValue | undefined | - | |
pt:icon:errors | PtValue | undefined | - | |
pt:icon:has-value | PtValue | undefined | - | |
pt:icon:loading | PtValue | undefined | - | |
pt:icon:readonly | PtValue | undefined | - | |
pt:icon:warnings | PtValue | undefined | - | |
pt:input | PtValue | undefined | - | |
pt:input:disabled | PtValue | undefined | - | |
pt:input:errors | PtValue | undefined | - | |
pt:input:has-value | PtValue | undefined | - | |
pt:input:loading | PtValue | undefined | - | |
pt:input:readonly | PtValue | undefined | - | |
pt:input:warnings | PtValue | undefined | - | |
pt:item | PtValue | undefined | - | |
pt:item:disabled | PtValue | undefined | - | |
pt:item:errors | PtValue | undefined | - | |
pt:item:has-value | PtValue | undefined | - | |
pt:item:loading | PtValue | undefined | - | |
pt:item:readonly | PtValue | undefined | - | |
pt:item:warnings | PtValue | undefined | - | |
pt:label | PtValue | undefined | - | |
pt:label:disabled | PtValue | undefined | - | |
pt:label:errors | PtValue | undefined | - | |
pt:label:has-value | PtValue | undefined | - | |
pt:label:loading | PtValue | undefined | - | |
pt:label:readonly | PtValue | undefined | - | |
pt:label:warnings | PtValue | undefined | - | |
pt:message | PtValue | undefined | - | |
pt:message:disabled | PtValue | undefined | - | |
pt:message:errors | PtValue | undefined | - | |
pt:message:has-value | PtValue | undefined | - | |
pt:message:loading | PtValue | undefined | - | |
pt:message:readonly | PtValue | undefined | - | |
pt:message:warnings | PtValue | undefined | - | |
pt:prefix | PtValue | undefined | - | |
pt:prefix:disabled | PtValue | undefined | - | |
pt:prefix:errors | PtValue | undefined | - | |
pt:prefix:has-value | PtValue | undefined | - | |
pt:prefix:loading | PtValue | undefined | - | |
pt:prefix:readonly | PtValue | undefined | - | |
pt:prefix:warnings | PtValue | undefined | - | |
pt:root | PtValue | undefined | - | |
pt:root:disabled | PtValue | undefined | - | |
pt:root:errors | PtValue | undefined | - | |
pt:root:has-value | PtValue | undefined | - | |
pt:root:loading | PtValue | undefined | - | |
pt:root:readonly | PtValue | undefined | - | |
pt:root:warnings | PtValue | undefined | - | |
pt:spinner | PtValue | undefined | - | |
pt:spinner:disabled | PtValue | undefined | - | |
pt:spinner:errors | PtValue | undefined | - | |
pt:spinner:has-value | PtValue | undefined | - | |
pt:spinner:loading | PtValue | undefined | - | |
pt:spinner:readonly | PtValue | undefined | - | |
pt:spinner:warnings | PtValue | undefined | - | |
pt:suffix | PtValue | undefined | - | |
pt:suffix:disabled | PtValue | undefined | - | |
pt:suffix:errors | PtValue | undefined | - | |
pt:suffix:has-value | PtValue | undefined | - | |
pt:suffix:loading | PtValue | undefined | - | |
pt:suffix:readonly | PtValue | undefined | - | |
pt:suffix:warnings | PtValue | undefined | - | |
readonly | boolean | undefined | false | 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 | boolean | undefined | false | Sets the input as required. Satisfied by the first tag: the underlying input drops its |
reverse | boolean | undefined | false | Reverses the layout. Applicable in every direction the order of the label and the input is swapped. |
variant | InputVariantType | undefined | 'outline' | Visual variant of the field box — the same names and tokens as the
|
warnings | string | string[] | undefined | - | Warning messages to display beneath the field, in their own |
v-model
Values kept in sync through v-model.
| Name | Type | Description |
|---|---|---|
modelValue | string[] | Strictly |
Events
| Name | Type | Description |
|---|---|---|
active | (event: "active"): void | |
blur | (event: "blur", event: FocusEvent): void | |
change | (event: "change", event: Event): void | |
click | (event: "click", event: MouseEvent): void | |
compositionend | (event: "compositionend", event: CompositionEvent): void | |
compositionstart | (event: "compositionstart", event: CompositionEvent): void | |
duplicate | (event: "duplicate", string: string): void | 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 | (event: "focus", event: FocusEvent): void | |
inactive | (event: "inactive"): void | |
input | (event: "input", event: Event): void | |
keydown | (event: "keydown", event: KeyboardEvent): void | |
keyup | (event: "keyup", event: KeyboardEvent): void | |
max | (event: "max", string: string): void | The cap counterpart of |
mousedown | (event: "mousedown", event: MouseEvent): void | |
mouseup | (event: "mouseup", event: MouseEvent): void | |
paste | (event: "paste", event: ClipboardEvent): void | |
update:modelValue | (event: "update:modelValue", value: string[]): void |
Slots
The listed properties are the ones exposed to the slot scope.
| Name | Type | Description |
|---|---|---|
append | Record<string, never> | Content appended inside the input field wrapper, after the tag chips. |
append-outer | Record<string, never> | Content appended outside the input field wrapper. |
description | BbTagDescriptionSlotProps | Replaces the description text. Provided alone (no |
label | BbTagLabelSlotProps | Replaces the default label text rendered above the input. |
prefix | Record<string, never> | Content rendered as an inline prefix inside the input field. |
prepend | Record<string, never> | Content prepended inside the input field wrapper, before the tag chips. |
prepend-outer | Record<string, never> | Content prepended outside the input field wrapper. |
suffix | Record<string, never> | Content rendered as an inline suffix inside the input field. |
Changes from v2
Props removed or renamed in 3.0. If you are coming from v2, the answer is here.
hasWarninghasWarningsfails silentlymultipleremovedfails silently