Menu Close

Tailwind CSS style for Select2

For my cryptomonitor website I needed some selectboxes with a search option to filter all the crypto coins. Using the standard <select> </select> html element does not provide a search functionality. Therefore I used the Select2 plugin based on javascript and jQuery. There was however one issue and that is that this plugin comes with a Bootstrap style sheet and my site is fully based on Tailwind CSS style.

So I decided to make my own style file and replace the package style.css with my own based on Tailwind CSS. I created an example project in Github where you can download the style.css file but you can also pull the complete project and run a quick local webserver to test and experiment with the example select option box with search.

See here:

Small difference between the two styles:

Related Posts

Leave a Reply

Your email address will not be published.