Isaac
Isaac

Reputation: 12874

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?

Upvotes: 4

Views: 5098

Answers (1)

kiranvj
kiranvj

Reputation: 34107

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

Upvotes: 5

Related Questions