Atelier UI

Search components…

Search components…

Tag Input

Tag input — add with Enter or comma, with suggestions and a tag limit.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

TagInputProps

Also accepts all props of Omit<React.ComponentProps<"div">, "onChange" | "defaultValue">

PropTypeDefaultDescription
valuestring[]——
defaultValuestring[][]—
onChange(tags: string[]) => void——
placeholderstring"Add a tag…"—
suggestionsstring[][]Offered as you type; any text is accepted unless `restrictToSuggestions`
restrictToSuggestionsbooleanfalse—
maxTagsnumber10—
variant"soft" | "outline""soft"Chip style

Install

$ npx shadcn@latest add https://chromotion.dev/r/tag-input.json

The CLI installs the base component; your customizations live in the code generated on the Customize tab.

More like this