042
Type to add tags with grouped suggestions, paste a comma list to add a bunch at once, and backspace to pull the last one back for editing. Each group keeps its own colour.
akatag input·tags·chips
Run this in any project set up for the shadcn CLI. It copies the Tag Input source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/tag-input.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { TagInput } from "@/components/tag-input";
export default function Page() {
return <TagInput />;
}A free React component in the Forms collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Tag Input source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| value | Tag[] | — |
| defaultValue | Tag[] | [] |
| onValueChange | (tags: Tag[]) => void | — |
| groups | TagGroup[] | [] |
| label | ReactNode | "Tags" |
| placeholder | string | "Add a tag…" |
| allowCustom | boolean | true |
| max | number | — |
| className | string | — |