LinuxmacOSWindows

Where Is the Tailwind Config File?

Tailwind v3 uses tailwind.config.js at the root, while v4 moves settings into CSS with @theme instead.

Last updated

Tailwind stores its configuration in the project, not in your home folder. Version 3 reads tailwind.config.js at the root for content paths, theme extensions, and plugins. Version 4 drops that file and configures everything from CSS instead.

That split causes most confusion. A v4 project puts @import "tailwindcss" and @theme blocks in its main stylesheet, so searching for a JS config finds nothing. Editor plugins follow the same file, which keeps terminal builds and IDE hints in sync.

Where Tailwind CSS stores this, by platform

Linux
[ProjectDir]/tailwind.config.js

v3 config beside package.json. Content globs inside it use paths relative to this file. v4 projects omit it and configure from CSS.

macOS
[ProjectDir]/tailwind.config.js

Same root file on Mac. The v4 stylesheet entry usually sits under src with the tailwindcss import. Keep config and CSS in git.

Windows
[ProjectDir]\tailwind.config.js

Same file on Windows. Glob separators inside follow JS conventions, not Explorer ones. Exact filename may be .ts in typed setups.

Frequently asked questions

How do I tell Tailwind v3 from v4 in a repo?

Look for tailwind.config.js at the root. Its absence plus a tailwindcss import in CSS means v4. The package.json version confirms it: v3 lists tailwindcss 3.x, v4 lists 4.x with @tailwindcss/vite or similar.

Can I keep a JS config on v4?

Yes, but v4 prefers CSS. Move content sources into @source directives and theme tweaks into @theme blocks. Keep the old JS file around only during migration, since mixed setups confuse the next person.

Notice an outdated path? Let us know.