Skip to content
FormBrowse form components
ComponentsFormNew in 0.2

Tag input

Multi-tag entry field. Add chips on Enter or comma; remove with Backspace.

Live preview

enterpriseannual

Usage

Adapters:React stableVue stable
index.html
<div class="lm-tag-input">
  <span class="lm-tag lm-tag-removable">enterprise<button class="lm-tag-remove">×</button></span>
  <input placeholder="Add tag…" />
</div>

CSS classes (1)

ClassDescription
lm-tag-inputWrapper that hosts tags + an inline input

React props (2)

PropTypeDefaultDescription
valuestring[]
onValueChange(values: string[]) => void

Accessibility

  • Combobox semantics: aria-expanded, aria-activedescendant.
  • Backspace from empty input removes the previous tag.

Spotted something wrong? Edit this entry on GitHub.