Tag Input

Type and press Enter to add tags; paste a comma list to add many.

no dependenciesMIT · free
ReactGSAP

Installation

npx shadcn@latest add https://ombakui.com/r/tag-input.json

Usage

import { TagInput } from "@/components/tag-input";

<TagInput label="Skills" value={skills} onChange={setSkills} max={6} />

Props

PropTypeDefaultDescription
label*string–Visible label.
valuestring[]–Tags (controlled).
defaultValuestring[][]Starting tags when uncontrolled.
onChange(tags: string[]) => void–Called with the full list after every change.
maxnumber–Maximum number of tags.
placeholderstring"Add a tag…"Placeholder for the text box.
classNamestring–