Skip to main content
If you created your project with 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 that app/globals.css contains the Tailwind import:
app/globals.css
If you see this line, Tailwind CSS 4 is active. No further configuration is needed to use RareUI components.

Tailwind CSS 4 (manual setup)

If you are adding Tailwind CSS 4 to an existing project that was not created with create-next-app, follow these steps.
1

Install packages

2

Configure PostCSS

Create a postcss.config.mjs file at your project root.
postcss.config.mjs
3

Add the Tailwind import

Add the import to your main CSS file.
app/globals.css
4

Start the dev server

Tailwind CSS 3 (legacy)

If you are using Tailwind CSS v3 in an existing project and cannot upgrade yet, follow these steps.
1

Install packages

2

Configure content paths

Update tailwind.config.ts to include all files that use Tailwind classes.
tailwind.config.ts
3

Add Tailwind directives

app/globals.css

Key differences between v3 and v4

Dark mode CSS variables

RareUI components use CSS variables for dark mode. Add these to your globals.css to support both light and dark themes:
app/globals.css
RareUI components reference these variables (e.g., bg-background, text-foreground, border-border) so they automatically adapt to light and dark modes without any extra configuration on your part.

Next steps

  • Add utilities — install animation dependencies and the cn() helper
  • CLI — add components with a single command