-
Notifications
You must be signed in to change notification settings - Fork 1
Tailwind CSS
Adarshtheki edited this page Jun 9, 2025
·
2 revisions
- Setup vite project
npm create vite@latest my-project -- --template react
cd my-project- Add tailwind
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p- Rename to tailwind.config.cjs, Auto following content
- Add the Tailwind directives to your CSS
index.css
@tailwind base;
@tailwind components;
@tailwind utilities;index.css
@layer components {
.align-element {
@apply mx-auto max-w-7xl px-8;
}
}index.html
<html lang="en" class="bg-slate-50 scroll-smooth"></html>