create-next-app and selected Tailwind CSS (the default), Tailwind CSS 4 is already installed and configured. You can verify this and move on to Add Utilities.
Tailwind CSS v4 ships with Next.js by default as of Next.js 15+. The configuration is now CSS-first — there is no
tailwind.config.ts file unless you create one.Verify your setup
Check thatapp/globals.css contains the Tailwind import:
app/globals.css
Tailwind CSS 4 (manual setup)
If you are adding Tailwind CSS 4 to an existing project that was not created withcreate-next-app, follow these steps.
Tailwind CSS 3 (legacy)
If you are using Tailwind CSS v3 in an existing project and cannot upgrade yet, follow these steps.Configure content paths
Update
tailwind.config.ts to include all files that use Tailwind classes.tailwind.config.ts
Key differences between v3 and v4
| Feature | v3 | v4 |
|---|---|---|
| Configuration | tailwind.config.ts (JavaScript) | @theme {} block in CSS |
| Import | @tailwind base/components/utilities | @import "tailwindcss" |
| PostCSS plugin | tailwindcss | @tailwindcss/postcss |
| Build speed | Baseline | Significantly faster |
Dark mode CSS variables
RareUI components use CSS variables for dark mode. Add these to yourglobals.css to support both light and dark themes:
app/globals.css
Next steps
- Add utilities — install animation dependencies and the
cn()helper - CLI — add components with a single command