Search code examples
tailwind-uitailwind-css

Interactive things in Tailwind with React or Angular Projects


If Bootstrap requires jQuery for Interactive things like Modals, Dropdowns, Tooltips etc, what is required by Tailwind, to do the same with React.js or Angular Projects ? Or do we have to use heavy code with states / directives as them are ?


Solution

  • Tailwind and Bootstarp are not realy comparable in that way. Bootstrap markets itself as a "feature-packed frontend toolkit" while Tailwind states it is a "A utility-first CSS framework" (both statements are taken from the homepage).

    In other words, Bootstrap includes both JavaScript and CSS and has ready to use components like modals and tooltips. Tailwind only provides you with CSS utility classes to create such components yourself. It also does not provide any JavaScript, so you can combine it with any framework you like. React or Angular are possible if you want to build an full JavaScript web app. If you need something that is more light weight you may find Alpine.js. You can also combine it with jQuery like Bootstrap does, hack why not?

    As a final note, there is also https://tailwindcomponents.com with community based components created with Tailwind.