Skip to content
TrademarkTrademark
Docs
Form Controls

TagInput

Updated: October 11, 2026
View on GitHub

TagInput holds an array rather than a string. Each entry renders as a chip that can be removed on its own, and typing a new one appends to the array.

Uncontrolled

Leave out value and the input keeps its own list, starting from defaultValue. onChange still receives every new array.

Toolbar size

size="xxs" starts the field at 32px, the height of a size="s" Button. It grows as chips are added, like every size.

Keyboard and screen readers

The tags are a list, each with a remove button named after its tag. Backspace in an empty field removes the last tag, and a polite live region says which; after a remove button is used, focus goes back to the field. labels translates the button names and the announcement.

API reference

Type
Default
value
The tags, as an array of strings, controlled. Leave it out and the input keeps its own list.
string[]—
defaultValue
The starting tags when `value` is left out.
readonly string[]—
onChange
Receives the whole new array, after an add or a remove.
(value: string[]) => void—
labels
The remove buttons' names and the removal announcement, to translate them.
TagInputLabels—
…and every InputProps propinherited—

Everything on Input — label, description, error, size, prefix, suffix — works here too.

Edit this page on GitHub