Skip to content

shadcn.io is an independent project built on shadcn/ui

Components

Free

Tags Input for Radix UI

Type a word, press Enter, and it becomes a removable chip. A tags input for React on Radix UI, with paste splitting, a tag limit and validation.

On this page9 sections

Radix UI does not include this primitive, so this page uses the Ark UI component. The visuals match the Ark UI version.

A tags input turns each entry someone types into a chip they can remove, and holds the chips as an array of strings. Enter or a comma adds the typed text as a tag. Reach for it when the values are free text with no fixed list behind them: labels on an issue, skills on a profile, the people on an invite.

When the values come from a list you already have, such as team members or countries, a Combobox with several selections lets people search that list instead.

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

Anatomy

Tags Input anatomy: label, item, item text, item delete trigger, input, clear trigger

Usage

import { Field, FieldLabel } from "@/components/ui/field";
import {
  TagsInput, TagsInputContext, TagsInputItem,
} from "@/components/ui/tags-input";

TagsInput draws the text field and the clear button itself, and placeholder sets the hint that field shows while the list is empty. Its children are the tags: TagsInputContext hands you the current array, and each entry becomes a TagsInputItem with its index and value. The input id in ids and the label's htmlFor tie the label to the text field.

<Field className="w-full max-w-sm">
  <FieldLabel htmlFor="frameworks">Frameworks</FieldLabel>
  <TagsInput
    defaultValue={["React", "Vue"]}
    ids={{ input: "frameworks" }}
    placeholder="Add framework"
  >
    <TagsInputContext>
      {({ value }) =>
        value.map((tag, index) => (
          <TagsInputItem index={index} key={tag} value={tag}>
            {tag}
          </TagsInputItem>
        ))
      }
    </TagsInputContext>
  </TagsInput>
</Field>

Accessibility

Radix UI has no component for typing tags, so this one is built on Ark UI's tags input. The caret stays in the text field: the arrow keys and Backspace highlight a tag without moving focus to it, and a live region announces each tag as it is added or deleted. Each remove button is labeled with its tag's text and left out of the tab order. A FieldLabel beside it isn't tied to the text field, so set an input id in ids on TagsInput and give the label a matching htmlFor, as every demo on this page does.

Arrow Left
Moves focus to the previous tag item.
Arrow Right
Moves focus to the next tag item.
Backspace
Deletes the tag item that has visual focus. With the caret at the start of the input and no tag highlighted, it highlights the last tag item first.
Enter
When a tag item has visual focus and editable is set, it puts the tag in edit mode. When the input has focus, it adds the value to the list of tags.
Delete
Deletes the tag item that has visual focus.
Ctrl+V
When addOnPaste is set. Adds the pasted value as a tags.
Arrow Down
When a tag is highlighted, clears the highlight and goes back to typing in the text field.
Escape
When a tag is highlighted, clears the highlight. While a tag is being edited, cancels the edit and keeps its old text.
Tab
Moves focus from the text field to the clear button, then on to the next control.
Space
When focus is on the clear button, removes every tag and moves focus back to the text field.

Demos

Blur behavior

With blurBehavior set to add, text left in the box becomes a tag when focus moves away, so someone who types a framework and tabs to the next field doesn't lose it. Without the prop that text stays in the box but isn't part of the value, and clear empties the box instead. Pick add for forms people tab through.

Preview width

Combobox

The tags input's text field doubles as the search box of a suggestion list with eight frameworks. Typing filters the list, picking a suggestion adds it through addValue, and frameworks already chosen drop out of the list. Enter with no suggestion highlighted adds whatever was typed. Use this when most tags are known in advance but people may still invent one.

Preview width

Controlled

The tags, starting at React and Solid, are held in the page's own state, passed in as value and replaced from onValueChange each time one is added or removed. Control the list when something besides the field changes it, such as a reset button, a saved draft or a URL parameter. When nothing else touches it, defaultValue is enough.

Preview width

Controlled input value

Two buttons above the field write React into the text box or empty it, through inputValue and onInputValueChange, while the tags stay on defaultValue. Hold the typed text in state when something outside the box fills it, such as a suggested tag or a search query. React is already a tag here, so Enter after the first button adds nothing.

Preview width

Custom delimiter

Here delimiter is a regular expression that matches a comma or any whitespace, so a space after a word ends the tag just as a comma would. Use it for one-word tags such as hashtags or package names, where people expect the space bar to commit. Keep the default comma when a tag can hold a space, like a city or a full name.

Preview width

Disable editing

editable is set to false here, which is also what TagsInput does when you leave the prop out, so a tag can be removed but never rewritten in place. Ark UI's own default is true, where a double click or Enter on a highlighted tag turns it back into text. Pass editable when people should fix a typo without deleting the tag, as in Editable.

Preview width

Disabled

disabled on TagsInput dims the box and turns off the text field, the remove buttons and the clear button, so the three frameworks can be read but not changed. The Field around it is marked disabled as well. Use it when a setting is locked by plan or by permission, and say why next to the field.

Preview width

Editable

editable turns on what TagsInput leaves off by default: a double click on a tag, or Enter on a highlighted one, turns it back into text. Enter saves the change and Escape cancels it. The hint under the field says so, since nothing on a tag shows it can be edited. Use it where typos are likely, such as skills or keywords typed in a hurry.

Preview width

Field

The box sits under a FieldLabel, with a FieldDescription below it that says to press Enter, a hint that stays on screen while someone types, unlike the placeholder, which goes away once there are tags. Use this layout when the tags are one question in a longer form.

Preview width

Form

The tags input sits in a form under the name labels, with Save and Reset buttons. Save reads the form's data, where the hidden input holds the tags as one string, and shows it under the buttons as "bug, frontend". Reset puts back the tags the field started with. Use this when the tags go out with an ordinary form post.

Preview width

Invalid

invalid on TagsInput and on its Field sets aria-invalid on the text field, and the border turns to the error color. Set it after a failed submit, when the list as a whole breaks a rule the field can't check, such as needing at least one tag. Put the reason in words under the field, because a red border doesn't say what to fix.

Preview width

Max length

maxLength is 10 here and goes onto the text field, so the browser stops accepting characters at the tenth, and the label states the limit up front. Use it for short tokens such as codes or slugs, where a pasted sentence should never become one tag. It limits the length of each tag, while max limits how many there are.

Preview width

Max tags

max is 3 and two frameworks are already in, so one more is accepted, and after that Enter does nothing and the extra text waits in the box. Use a hard cap when the meaning is up to some number, such as three reviewers or five labels. The field shows no message at the limit, so state it in the label, as this one does.

Preview width

Max with overflow

The cap is 3 again and the field starts full, but allowOverflow lets a fourth tag in. Past the cap, the root gets data-invalid, the text field gets aria-invalid and the error border, and onValueInvalid fires. Prefer this over a hard cap when people should see what they added and choose which tag to drop.

Preview width

Paste behavior

addOnPaste is on and the field starts empty, so pasting the line React, Vue, Svelte creates three tags, split on the comma that delimiter names. Turn it on when values arrive in bulk, such as a list of invitees. Leave it off when a comma can belong inside one tag, because a paste would break that tag apart.

Preview width

Sanitize value

sanitizeValue trims and lowercases the text before it becomes a tag, so typing React or REACT adds nothing, since both turn into the react already in the list. Use a sanitizer for emails, slugs and handles, where case and stray spaces shouldn't make two tags. Passing one replaces the default, which only trims, so keep the trim in yours.

Preview width

Size lg

With size set to lg, the tags grow to 28 pixels with larger text and the box to at least 36 pixels. Use it when the tags input is the main control on a screen, such as the recipients line of a message composer. Adding, editing and removing tags work the same at every size.

Preview width

Size md

md is the default, so this field looks the same as one with no size: 24-pixel tags in a box at least 32 pixels tall. It is the size for an ordinary form, beside inputs and selects at their own default size. Spell it out only when the size comes from a variable, such as a density setting.

Preview width

Size sm

With size set to sm, the tags shrink to 20 pixels and the box to a 28-pixel minimum, for a filter bar or a table toolbar where vertical room is tight. Put it beside other small controls, because a small tags field next to default-height buttons looks out of line.

Preview width

Validation

validate gets the tags so far and the text about to become a tag, and this one accepts three or more letters, digits or hyphens that aren't in the list yet. A rejected entry is cleared from the box, so onValueInvalid puts the reason under the field in a FieldError and marks it invalid until the next keystroke. Pair every validator with a message like this one.

Preview width

FAQ

When should I use a Tags Input instead of a multi-select Combobox?

Use a tags input when people type values that don't exist anywhere yet: labels on an issue, keywords, email addresses. Anything typed can become a tag, subject to your validate function.

A Combobox that allows several selections fits when the values come from a list you already have, such as team members or countries, because people search it and can't pick something that isn't there. When most values are known but some will be new, the Combobox demo puts suggestions on a tags input.

How do people add and remove tags in a Tags Input?

Enter adds the typed text as a tag, and so does typing the delimiter, a comma unless you change delimiter. Each tag has its own remove button, and the clear button at the end of the box removes them all.

From the keyboard, Backspace with the caret at the start of the text field highlights the last tag, and the next press deletes it, so holding the key empties the list from the end. ArrowLeft and ArrowRight move the highlight, and Delete removes the highlighted tag.

How do I control the Tags Input value in React?

Keep the tags in state as an array of strings, pass it as value, and update it in onValueChange, which receives an object with the new array in details.value. The Controlled demo does exactly this.

defaultValue is enough when nothing but the field changes the list. Control it when a reset button, a saved draft or another field has to change the tags.

How do I limit the number of tags or stop duplicates in a Tags Input?

Set max to the most tags the list may hold. At the cap, Enter and the delimiter do nothing and the typed text waits in the box, as in Max tags, or add allowOverflow to let more in and mark the field invalid instead.

Duplicates are refused with no prop at all: a tag already in the list is dropped and the box is cleared. Set allowDuplicates if the same text may appear twice. maxLength caps the characters in each tag, not the number of tags.

How do I paste a comma-separated list into a Tags Input?

Add addOnPaste to TagsInput. A pasted line is split on the delimiter, each piece goes through sanitizeValue, and every piece becomes a tag, as the Paste behavior demo shows. Without the prop, the whole paste lands in the box and turns into one tag on Enter.

Your validate function runs once, on the whole pasted text rather than on each piece. A paste also isn't held to max: it can push the list past the cap, which marks the field invalid as allowOverflow would, and from there Enter adds more tags too.

How does a Tags Input submit its tags with a form?

Give TagsInput a name, and a hidden input submits the tags as one string joined by a comma and a space, so React and Vue arrive as "React, Vue", as the Form demo shows. Split it on the server, or, if a tag can contain a comma, keep the array in state and send it as JSON yourself.

The hidden input also follows the form: resetting the form puts back the tags the field started with. Set form to the form's id when the field sits outside the form element it belongs to.

How do I add autocomplete suggestions to a Tags Input?

Wrap it in an Autocomplete and make the tags input's text field its input, as the Combobox demo does. Create the tags input with useTagsInput, render it through TagsInputRootProvider, and wrap TagsInputInput in Ark UI's ArkCombobox.Input so the two share one field. In the onValueChange of Autocomplete, pass the picked item to addValue and keep its own value empty, so each pick becomes a tag.

Filter the chosen tags out of the suggestions, as the demo does, so nobody picks the same one twice. When every value must come from the list, a Combobox with several selections is simpler.

Why can't I edit a tag after adding it to the Tags Input?

TagsInput in components/ui/tags-input sets editable to false unless you pass it, although Ark UI's own default is true. Set editable to true, and a double click on a tag or Enter on a highlighted one turns it back into text, as in the Editable demo.

Enter saves the change and Escape cancels it. Saving an empty tag deletes it, and an edit that matches another tag leaves the old text in place. useTagsInput, which the Combobox demo uses, keeps Ark UI's default, so its tags are editable already.

API Reference

TagsInput

<div> data-slot="tags-input"

PropType
inputValue?string

The controlled tag input's value.

defaultInputValue?string

The initial tag input value when rendered. Use when you don't need to control the tag input value.

onInputValueChange?(details: InputValueChangeDetails) → void

Callback fired when the input value is updated.

Type
(details: InputValueChangeDetails) → void
Parameters

details – { inputValue: string }

Returns
void
value?string[]

The controlled tag value.

defaultValue?string[]

The initial tag value when rendered. Use when you don't need to control the tag value.

onValueChange?(details: ValueChangeDetails) → void

Callback fired when the tag values is updated.

Type
(details: ValueChangeDetails) → void
Parameters

details – { value: string[] }

Returns
void
addOnPaste?boolean

Whether to add a tag when you paste values into the tag input.

Default
false
allowDuplicates?boolean

Whether to allow duplicate tags.

Default
false
allowOverflow?boolean

Whether to allow tags to exceed max. In this case, we'll attach data-invalid to the root

autoFocus?boolean

Whether the input should be auto-focused.

blurBehavior?"clear" | "add"

The behavior of the tags input when the input is blurred - "add": add the input value as a new tag - "clear": clear the input value

Type
"clear" | "add"
delimiter?string | RegExp

The character that serves has: - event key to trigger the addition of a new tag - character used to split tags when pasting into the input

Type
string | RegExp
Default
","
dir?"ltr" | "rtl"

The document's text/writing direction.

Type
"ltr" | "rtl"
Default
"ltr"
disabled?boolean

Whether the tags input should be disabled.

editable?boolean

Whether a tag can be edited after creation, by pressing Enter or double clicking. Ark default: true.

Default
false
form?string

The associate form of the underlying input element.

id?string

The unique identifier of the machine.

ids?object

The ids of the elements in the tags input. Useful for composition.

Type
{ root?: string; input?: string; hiddenInput?: string; clearBtn?: string; label?: string; control?: string; item?: (opts: ItemProps) → string; itemDeleteTrigger?: (opts: ItemProps) → string; itemInput?: (opts: ItemProps) → string }
invalid?boolean

Whether the tags input is invalid.

max?number

The max number of tags.

Default
Infinity
maxLength?number

The max length of the input.

name?string

The name attribute for the input. Useful for form submissions.

onFocusOutside?(event: FocusOutsideEvent) → void

Function called when the focus is moved outside the component.

Type
(event: FocusOutsideEvent) → void
Parameters

event – FocusOutsideEvent

Returns
void
onHighlightChange?(details: HighlightChangeDetails) → void

Callback fired when a tag is highlighted by pointer or keyboard navigation.

Type
(details: HighlightChangeDetails) → void
Parameters

details – { highlightedValue: string | null }

Returns
void
onInteractOutside?(event: InteractOutsideEvent) → void

Function called when an interaction happens outside the component.

Type
(event: InteractOutsideEvent) → void
Parameters

event – InteractOutsideEvent

Returns
void
onPointerDownOutside?(event: PointerDownOutsideEvent) → void

Function called when the pointer is pressed down outside the component.

Type
(event: PointerDownOutsideEvent) → void
Parameters

event – PointerDownOutsideEvent

Returns
void
onValueInvalid?(details: ValidityChangeDetails) → void

Callback fired when the max tag count is reached or the validateTag function returns false.

Type
(details: ValidityChangeDetails) → void
Parameters

details – { reason: ValidityState }

Returns
void
placeholder?string

The placeholder text for the input.

readOnly?boolean

Whether the tags input should be read-only.

required?boolean

Whether the tags input is required.

sanitizeValue?(value: string) → string

Function to sanitize the tag value before adding. Useful for trimming whitespace, normalizing case, or stripping special characters.

Default
(value) => value.trim()
Parameters

value – string

Returns
string
showClear?boolean

Whether to show the clear button.

Default
true
size?TagsInputSize

The size of the control.

Default
"md"
translations?object

Specifies the localized strings that identifies the accessibility elements and their states.

Type
{ clearTriggerLabel?: string; deleteTagTriggerLabel?: (value: string) → string; tagSelected?: (value: string) → string; tagAdded?: (value: string) → string; tagsPasted?: (value: string[]) → string; tagEdited?: (value: string) → string; tagUpdated?: (value: string) → string; tagDeleted?: (value: string) → string; noTagsSelected?: string; inputLabel?: (count: number) → string }
validate?(details: ValidateArgs) → boolean

Returns a boolean that determines whether a tag can be added. Useful for preventing duplicates or invalid tag values.

Type
(details: ValidateArgs) → boolean
Parameters

details – { inputValue: string; value: string[] }

Returns
boolean
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-empty?string

Present when the content is empty.

data-focus?string

Present when focused.

data-invalid?string

Present when invalid.

data-readonly?string

Present when read-only.

data-size?string

Mirrors size.

TagsInputControl

<div> data-slot="tags-input-control"

PropType
showClear?boolean

Whether to show the clear button.

Default
true
size?TagsInputSize

The size of the control.

Default
"md"
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-focus?string

Present when focused.

data-invalid?string

Present when invalid.

data-readonly?string

Present when read-only.

TagsInputInput

<input> data-slot="tags-input-input"

PropType
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

AttributeType
data-empty?string

Present when the content is empty.

data-invalid?string

Present when invalid.

data-readonly?string

Present when read-only.

TagsInputClearTrigger

<button> data-slot="tags-input-clear-trigger"

PropType
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

AttributeType
data-readonly?string

Present when read-only.

TagsInputItem

<div> data-slot="tags-input-item"

PropType
indexstring | number

The item's position in its list.

Type
string | number
valuestring

The item's value.

disabled?boolean

Whether the item is disabled.

showDelete?boolean

Whether to show the clear trigger.

Default
true
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-valuestring

The value of the item.

TagsInputItemPreview

<div> data-slot="tags-input-item-preview"

PropType
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-highlighted?string

Present when highlighted.

data-valuestring

The value of the item.

TagsInputItemInput

<input> data-slot="tags-input-item-input"

PropType
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

TagsInputItemText

<span> data-slot="tags-input-item-text"

PropType
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-highlighted?string

Present when highlighted.

TagsInputItemDeleteTrigger

<button> data-slot="tags-input-item-delete-trigger"

PropType
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled.

data-highlighted?string

Present when highlighted.

TagsInputRootProvider

<div> data-slot="tags-input-root-provider"

PropType
valueUseTagsInputReturn

What useTagsInput() returns: the state and API, made outside the component to control it.

showClear?boolean

Whether to show the clear button.

Default
true
size?TagsInputSize

The size of the control.

Default
"md"
asChild?boolean

Merge props onto the child element instead of rendering a host.

className?string

Merged with the part's classes.

AttributeType
data-disabled?string

Present when disabled is true.

data-empty?string

Present when empty is true.

data-focus?string

Present when focused is true.

data-invalid?string

Present when invalid is true.

data-readonly?string

Present when readOnly is true.

data-size?string

Mirrors size.

useTagsInput

PropType
inputValue?string

The controlled tag input's value.

defaultInputValue?string

The initial tag input value when rendered. Use when you don't need to control the tag input value.

onInputValueChange?(details: InputValueChangeDetails) → void

Callback fired when the input value is updated.

Type
(details: InputValueChangeDetails) → void
Parameters

details – { inputValue: string }

Returns
void
value?string[]

The controlled tag value.

defaultValue?string[]

The initial tag value when rendered. Use when you don't need to control the tag value.

onValueChange?(details: ValueChangeDetails) → void

Callback fired when the tag values is updated.

Type
(details: ValueChangeDetails) → void
Parameters

details – { value: string[] }

Returns
void
addOnPaste?boolean

Whether to add a tag when you paste values into the tag input.

Default
false
allowDuplicates?boolean

Whether to allow duplicate tags.

Default
false
allowOverflow?boolean

Whether to allow tags to exceed max. In this case, we'll attach data-invalid to the root

autoFocus?boolean

Whether the input should be auto-focused.

blurBehavior?"clear" | "add"

The behavior of the tags input when the input is blurred - "add": add the input value as a new tag - "clear": clear the input value

Type
"clear" | "add"
delimiter?string | RegExp

The character that serves has: - event key to trigger the addition of a new tag - character used to split tags when pasting into the input

Type
string | RegExp
Default
","
disabled?boolean

Whether the tags input should be disabled.

editable?boolean

Whether a tag can be edited after creation, by pressing Enter or double clicking.

Default
true
form?string

The associate form of the underlying input element.

id?string

The unique identifier of the machine.

ids?object

The ids of the elements in the tags input. Useful for composition.

Type
{ root?: string; input?: string; hiddenInput?: string; clearBtn?: string; label?: string; control?: string; item?: (opts: ItemProps) → string; itemDeleteTrigger?: (opts: ItemProps) → string; itemInput?: (opts: ItemProps) → string }
invalid?boolean

Whether the tags input is invalid.

max?number

The max number of tags.

Default
Infinity
maxLength?number

The max length of the input.

name?string

The name attribute for the input. Useful for form submissions.

onFocusOutside?(event: FocusOutsideEvent) → void

Function called when the focus is moved outside the component.

Type
(event: FocusOutsideEvent) → void
Parameters

event – FocusOutsideEvent

Returns
void
onHighlightChange?(details: HighlightChangeDetails) → void

Callback fired when a tag is highlighted by pointer or keyboard navigation.

Type
(details: HighlightChangeDetails) → void
Parameters

details – { highlightedValue: string | null }

Returns
void
onInteractOutside?(event: InteractOutsideEvent) → void

Function called when an interaction happens outside the component.

Type
(event: InteractOutsideEvent) → void
Parameters

event – InteractOutsideEvent

Returns
void
onPointerDownOutside?(event: PointerDownOutsideEvent) → void

Function called when the pointer is pressed down outside the component.

Type
(event: PointerDownOutsideEvent) → void
Parameters

event – PointerDownOutsideEvent

Returns
void
onValueInvalid?(details: ValidityChangeDetails) → void

Callback fired when the max tag count is reached or the validateTag function returns false.

Type
(details: ValidityChangeDetails) → void
Parameters

details – { reason: ValidityState }

Returns
void
placeholder?string

The placeholder text for the input.

readOnly?boolean

Whether the tags input should be read-only.

required?boolean

Whether the tags input is required.

sanitizeValue?(value: string) → string

Function to sanitize the tag value before adding. Useful for trimming whitespace, normalizing case, or stripping special characters.

Default
(value) => value.trim()
Parameters

value – string

Returns
string
translations?object

Specifies the localized strings that identifies the accessibility elements and their states.

Type
{ clearTriggerLabel?: string; deleteTagTriggerLabel?: (value: string) → string; tagSelected?: (value: string) → string; tagAdded?: (value: string) → string; tagsPasted?: (value: string[]) → string; tagEdited?: (value: string) → string; tagUpdated?: (value: string) → string; tagDeleted?: (value: string) → string; noTagsSelected?: string; inputLabel?: (count: number) → string }
validate?(details: ValidateArgs) → boolean

Returns a boolean that determines whether a tag can be added. Useful for preventing duplicates or invalid tag values.

Type
(details: ValidateArgs) → boolean
Parameters

details – { inputValue: string; value: string[] }

Returns
boolean

TagsInputContext

PropType
addValue(value: string) → void

Function to add a tag to the tags.

Parameters

value – string

Returns
void
atMaxboolean

Whether the tags have reached the max limit.

clearInputValueVoidFunction

Function to clear the value of the tags entry input.

clearValue(id?: string) → void

Function to clear the value of the tags.

Parameters

id? – string

Returns
void
countnumber

The number of the tags.

emptyboolean

Whether the tags are empty.

focusVoidFunction

Function to focus the tags entry input.

getItemState(props: ItemProps) → ItemState

Returns the state of a tag.

Parameters

props – { index: string | number; value: string; disabled?: boolean }

Returns
ItemState
inputValuestring

The value of the tags entry input.

setInputValue(value: string) → void

Function to set the value of the tags entry input.

Parameters

value – string

Returns
void
setValue(value: string[]) → void

Function to set the value of the tags.

Parameters

value – string[]

Returns
void
setValueAtIndex(index: number, value: string) → void

Function to set the value of a tag at the given index.

Type
(index: number, value: string) → void
Parameters

index – number

value – string

Returns
void
valuestring[]

The value of the tags as an array of strings.

valueAsStringstring

The value of the tags as a string.