What is React?
What is Tailwind?
Tailwindcss is a utility-first CSS framework packed with classes that can be composed to build any design, directly in your markup.
- Nodejs version 8.10 or Higher.
Today we are going to add tailwind css in our React application without using npm.
Using create-react-app we are going to generate a new react project.
npx create-react-app react-tailwind cd react-tailwind npm start
Add Tailwindcss into Our react App
Inside the public folder, locate the file index.html.
and add the Tailwindcss CDN link
It will looks as it under.
We have successfully add Tailwindcss inside our React App.
Top comments (5)
Congratulations for your post! it's simple and direct to the point, but I think that approach wouldn't be too viable for production-ready apps, because of the Tailwind's
purgefunctionality, that reduces a lot of the final css to be downloaded by the user's browser, and importing from a CDN gets all the whole lib styling, and that's heavy :0
Please add the bash/html tag to the codeblocks.