TagInput
The enhancement of Input supports input tags and management tags.
Import
import { TagInput } from 'rsuite';
// or
import TagInput from 'rsuite/TagInput';
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 |
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) |