MultiValueInput
freeMultiValueInput turns repeated text entries into removable tag values.
PriorityRetailFollow-up
Installation
Add this component with the NateUI CLI.
Examples
Basic
ReactTypeScript
Controlled
JavaScriptCSS
Current skills: JavaScript, CSS
Validation
Max Tags
DesignFrontend
2 of 4 tags used.
Size
Small
Medium
Large
Overflow
NorthwindWholesalePriorityQ3RenewalPartner
Disabled
ArchivedLocked
API
MultiValueInput renders a tag list plus an inline text input. Press Enter to add a value, use Backspace/Delete to remove focused tags, and click the overflow counter to inspect hidden tags.
| Prop | Description | Type | Default |
|---|---|---|---|
className | Class names applied to the root control. | string | '' |
defaultValue | Initial tags for uncontrolled usage. | string[] | [] |
disabled | Prevents editing and tag removal, and applies disabled control styling. | boolean | false |
invalid | Applies invalid styling; also inherits invalid state from Form.Field. | boolean | - |
maxTags | Maximum number of tags that can be added. | number | - |
onChange | Called with the next tag list whenever tags change. | MultiValueChangeHandler | - |
onTagAdd | Called after a tag is accepted. | MultiValueTagHandler | - |
onTagRemove | Called after a tag is removed. | MultiValueTagHandler | - |
placeholder | Placeholder text shown while no tags are present. | string | - |
readOnly | Marks the text input read-only. Removal buttons still follow disabled. | boolean | - |
size | Control size. | ControlSize | 'md' |
validate | Returns whether a new tag should be accepted. | MultiValueValidator | - |
value | Controlled tag list. | string[] | - |
...nativeDivProps | Native props applied to the root div, except onChange and defaultValue. | NativeMultiValueInputProps | - |