TagInput
Multi-value tag input for comma-separated or enter-separated tag entry.
Import
import { TagInput } from '@dangbt/pro-ui'
Basic usage
<TagInput label="Tags" placeholder="Add tags..." />
Controlled
const [tags, setTags] = useState(['react', 'typescript'])
<TagInput
label="Technologies"
value={tags}
onChange={setTags}
placeholder="Add technology..."
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label |
value | string[] | — | Controlled tags |
defaultValue | string[] | — | Uncontrolled default |
onChange | (tags: string[]) => void | — | Called on change |
placeholder | string | — | Placeholder |
maxTags | number | — | Maximum number of tags |