Reputation: 657
I'd like to add tags-input field on my website. Please take a look at the screenshot.
Also, you can check here - https://insurify.com/compare/#/cars/car_make/1
As you can see here, when input one tag, there's different kinds of tags displaying.
I need an example like this.
Please someone help me!!
Upvotes: 0
Views: 338
Reputation: 16325
Welcome to SO! I’m the head of engineering at Insurify, and my team and I “invented” that type of input (we call it a multi-tag-select) for our website. It wasn’t a simple process, because we had never seen anything like it before, so we wound up creating custom code to handle most of the functionality.
I’ll try to explain it to the best of my ability so you can create something similar for your product.
The component is basically a mash-up of:
We're using an API to grab data at different points, and we're caching the data on the server to make it faster, but none of that is specific to this input, so I won't detail how any of that is handled.
The way it works is:
That's about it. Most of the work is in loading the data and wiring it all together.
If you have a specific question about any piece of this component, please feel free to ask in another question and I'll help where I can!
Upvotes: 2