Tailwind lets you style elements directly in HTML with small, ready-made classes.
CSS:
<h1 class="title">Hello</h1>
.title { color: blue; font-size: 48px; font-weight: bold; }
Tailwind:
<h1 class="text-blue-600 text-5xl font-bold">Hello</h1>
Why developers love it:
.card-wrapper-inner-leftLet's get Tailwind running in 4 steps.
1. Create a Vite project and install Tailwind
npm create vite@latest my-tailwind-app # Vanilla → JavaScript
cd my-tailwind-app
npm install tailwindcss @tailwindcss/vite
2. Add the plugin in vite.config.js
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({ plugins: [tailwindcss()] })
3. Import Tailwind in src/style.css (delete everything else)