Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to hold multiple values within a single TextInput?

Has anyone ever created some TextInput component which can hold multiple values? For example label = 'Fruits' and a single text input allows user to key in "Banana", "Orange" and so on? Probably automatically splitting them using "Return"/"Enter" key?

like image 733
Isaac Avatar asked Aug 31 '25 02:08

Isaac


1 Answers

You should use the react-tag-input for this. Demo here

NPM

Installation

npm install --save react-tag-input

enter image description here

There are lot to experiment with.

Another good tag input react-tagsinput

enter image description here

If bootstrap is an option you could use this

enter image description here

like image 144
kiranvj Avatar answered Sep 02 '25 17:09

kiranvj