TagInput
The enhancement of Input supports input tags and management tags.
Import
import { TagInput } from 'rsuite';Examples
Basic
Size
Block
Tag trigger
Sets the trigger for creating a tag. Options include: Enter, Space, Comma. and the default value Enter. Multiple trigger values can be set.
Disabled and read only
Accessibility
Learn more in Accessibility.
Props
              <TagInput>
              
            
| Property | Type(Default) | 
Description | 
|---|---|---|
| defaultValue | string[] | Default values of the selected items | 
| disabled | boolean | Whether disabled component | 
| onChange | (value:string[], event) => void | Callback fired when value change | 
| onClean | (event) => void | Callback fired when value clean | 
| onTagRemove | (value: string, event: MouseEvent) => void | Callback fired when tag remove | 
| size | 'lg' | 'md' | 'sm' | 'xs' ('md') | 
A picker can have different sizes | 
| trigger | 'Enter' | 'Space' | 'Comma' (['Enter', 'Space']) | 
Set the trigger for creating tags | 
| value | string[] | Specifies the values of the selected items (Controlled) |