From the course: CSS and JavaScript Library Integration

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Integrating Tailwind with React.js

Integrating Tailwind with React.js - JavaScript Tutorial

From the course: CSS and JavaScript Library Integration

Integrating Tailwind with React.js

- [Instructor] It's time to learn how to integrate Tailwind CSS with React JS. You can either set up Tailwind on an existing React project or a new React app from scratch. We'll be starting from scratch in this lesson. Do you know the command to create a new React app? If you don't, you'll know about it in a bit. The first step is to run the npx create-react-app and the name of the project or give it a random name. npx create-react-app my-app. Then click Enter. I already run this command, so I don't need to run that again. Second step, change your directory into the folder you just created your React configuration into. Install and initialize Tailwind CSS by using the following command. To change directory, cd my-app, the name of the folder, click Enter. Then, npm install - D tailwindcss. This will install Tailwind and add it to the dependencies of your project. Next is to initialize Tailwind by…

Contents