UI
← Home

Tags Input

A token field: a text input paired with a list of removable tags. Type a value and press Enter to add a tag, click a tag's × to remove it, or press Backspace in the empty field to remove the last one. Each tag is a list item with a named remove button, so the token set is fully reachable by keyboard and assistive technology. Ctrl/Cmd+Z puts a removed tag back where it was (and takes an added one away) — but never inside the text field, where the platform's own undo belongs.

  • Axe
  • Focus
  • Undo
  • Copy
  • Paste

Preview

  • Design
  • Urgent

Installation

npx shadcn@latest add https://ui.publictheta.com/r/tags-input.json

Conformance

Verified against the @publictheta/ui-spec tags-input specification on both the React and vanilla reference implementations, across Chromium, Firefox, and WebKit.

  • Axe No WCAG 2 A/AA axe-core violations
  • Focus A visible focus indicator appears on keyboard focus (WCAG 2.4.7)
  • Undo What it destroys or moves comes back: Cmd/Ctrl+Z takes the last change back and announces it, Cmd/Ctrl+Shift+Z does it again, and a run of like changes is one step
  • Copy Cmd/Ctrl+C puts what is selected on the clipboard in every flavour the widget promises — and a touch device, which has no command key, can do the same thing with a control
  • Paste A paste lands: the widget takes the richest flavour it understands, never injects markup it did not ask for, and pastes as plain text on Shift+Cmd/Ctrl+V

See the full conformance matrix across all components.