Set Up Tailwind Css With create-react-app and yarn
Ashirbad Panigrahi
Posted on January 1, 2022
Create a new react project with yarn
yarn create react-app react-tailwind-css-stater
Install Tailwind CSS with postcss & autoprefixer
yarn add -D tailwindcss postcss autoprefixer
Generate tailwind.config.js
and postcss.config.js
yarn tailwindcss init -p
Modify tailwind.config.js
file
module.exports = {
content: ["./src/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
};
Add tailwind base, components and utilities to index.css
@tailwind base;
@tailwind components;
@tailwind utilities;
GitHub Repo
💖 💪 🙅 🚩
Ashirbad Panigrahi
Posted on January 1, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.