Skip to content
Advertisement

How to add icons and tooltip on react-select component?

I am trying add fontawesome icon and tooltip on react-select component options. Below image i am trying to achieve

enter image description here

Code

JavaScript

Advertisement

Answer

You need to add the component as shown below, added it for only one option for demo purpose, you can style it in your way.

Even you can use a reusable component to generate label, since label accepts a node.

I hope this will solve the issue.

JavaScript

Entire Code

JavaScript

Working codepen

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement