Install Tailwind CSS
Install Tailwind CSS with Next.js
Tailwind CSS v4 Installation
Create your project
code
Install Tailwind CSS
code
Create your CSS file
Add the Tailwind import to your global CSS file.
app/globals.css
Configure PostCSS
postcss.config.mjs
Start your build process
code
Start using Tailwind
app/page.tsx
Key differences in v4
Tailwind v4 is CSS-first. Theme values can live in @theme inline, custom variants can live in CSS, and the PostCSS plugin is now @tailwindcss/postcss.