React Tailwind Css Stater
Steps for creating react-tailwind-css-stater
with yarn
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
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;