If you're starting with Tailwind CSS v4, you might’ve noticed:
most tutorials and videos are still stuck in the old version. I faced it too—docs didn’t help much, and outdated commands like tailwindcss inithad me completely lost.
So here’s the step-by-step setup that finally worked for me:
✅ Tailwind v4 Setup with React + Vite
Create your Vite + React project:
npm create vite@latest my-app -- --template react
cd my-appInstall Tailwind CSS v4 with Vite plugin:
npm install -D tailwindcss@latest @tailwindcss/viteCreate and edit src/index.css:
@import "tailwindcss";Update vite.config.js:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
  plugins: [react(), tailwindcss()],
});
Make sure main.jsx
imports ./index.cssTest it in App.jsx:
function App() {
  return (
    <h1 className="text-4xl font-bold text-blue-600">
      Hello Tailwind v4!
    </h1>
  );
}
- Run your dev server:
npm run dev 
✅ And you’re all set with Tailwind v4 running in your React app using Vite!
😅 Want to Hear the Chaos Behind This?
If you’re curious about how I actually figured this out—confusion, outdated guides, broken commands, Discord help, and even ChatGPT misfires—I wrote a separate blog post on my full struggle story in Medium.
👉 Read: 💻 My Tailwind CSS v4 Setup Struggle
Hope it helps another beginner avoid the same mess I went through! 💙
    
Top comments (2)
Thank You so much Lord Potato. I have been searching and searching after getting nothing from tailwind docs and youtube, and FINALLLLY. You saved more of my TIME.
I don't use this website at all but I register only for saying thank you!
And f**k gpt.😤