# Step by Step Guide
- Create Project Folder
pnpx create vite@latest my-vite-app -- --template react
cd my-vite-app
- Install Tailwind CSS and Other Dependencies
pnpm install -D tailwindcss postcss autoprefixer
- Generate Tailwind CSS Config File
pnpx tailwindcss init -p
- Add Tailwind CSS to PostCSS Config File
tailwind.config.js
/** @type {import('tailwindcss').Config} */
export default {
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
extend: {},
},
plugins: [],
};
postcss.config.js
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
- Add Tailwind CSS to
index.css
index.css
@tailwind base;
@tailwind components;
@tailwind utilities;
- Start Development Server
pnpm dev
- Build for Production
pnpm build
# Template
React Vite App (opens new window)