Tags Input
Ready
Multi-value input with suggestions and keyboard navigation
Interactive Preview
Type and press Enter or comma to add tags
ReactTypeScript
Press Enter or comma to addWith Suggestions
Autocomplete suggestions as you type
frontend
Start typing for suggestions, use arrow keys to navigateTag Variants
Three visual styles for tags
Filled (default)
DesignCode
Outline
DesignCode
Subtle
DesignCode
Sizes
Three size options: sm, md, and lg
Small
ReactVue
Medium (default)
ReactVue
Large
ReactVue
With Limits
Limit the maximum number of tags
DesignSystems
You can add up to 5 tagsStates
Different states for various use cases
Read Only
ReactTypeScriptCSS
Disabled
ReactTypeScript
With Error
At least one tag is required
Usage
How to use the Tags Input component
// Basic usage
<TagsInput
value={tags}
onChange={setTags}
placeholder="Add tag..."
/>
// With suggestions
<TagsInput
label="Skills"
value={tags}
onChange={setTags}
suggestions={skillSuggestions}
maxTags={10}
/>
// With validation
<TagsInput
value={tags}
onChange={setTags}
validateTag={(tag) => tag.length >= 3}
allowDuplicates={false}
/>
API Reference
Props
value-string[] - Array of tag stringsonChange-(value: string[]) => void - Callback with updated tagsplaceholder-string - Input placeholder (default: "Add tag...")maxTags-number - Maximum number of tags allowedmaxLength-number - Maximum length for each tagsize-"sm" | "md" | "lg" (default: "md")tagVariant-"filled" | "outline" | "subtle" (default: "filled")suggestions-string[] - Array of suggested valuesallowDuplicates-boolean - Allow duplicate tags (default: false)validateTag-(tag: string) => boolean - Custom validation functiononTagAdd-(tag: string) => void - Called when tag is addedonTagRemove-(tag: string) => void - Called when tag is removedseparator-string[] - Keys that trigger tag addition (default: ["Enter", ","])disabled-boolean - Disable interaction (default: false)readOnly-boolean - Make read-only (default: false)label-string - Label texterror-string - Error messagehelperText-string - Helper text