1

Tailwind CSS IntelliSense doesn't work in a new Next.js project unless I add tailwind.config.ts

I created a new Next.js project, and Tailwind CSS (v4) was installed by default. However, in my editor (WebStorm), I don't get any suggestions for Tailwind classes.

For example, without a config file:

No IntelliSense

As soon as I add an empty tailwind.config.ts file in the project root, IntelliSense starts working:

IntelliSense works

Is this expected behavior? Do I always need a tailwind.config file for IntelliSense to work, or am I missing something in my setup?

Here are my devDependencies:

"devDependencies": {
    "@eslint/eslintrc": "^3",
    "@tailwindcss/postcss": "^4",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "15.5.0",
    "tailwindcss": "^4",
    "typescript": "^5"
  }
6
  • 1
    What's the name of your main CSS file? And what its content? Are you using a Sass, Less, or Stylus preprocessor? Commented Sep 8 at 19:38
  • Maybe duplicated: VSCode Tailwind CSS Intellisense autocompletion and suggestions not working after installing Tailwind v4 Commented Sep 14 at 8:46
  • @rozsazoltan That question is about Visual Studio Code, and this one about WebStorm. Commented Sep 14 at 10:49
  • @MarkRotteveel ops, really. I've already gone over this once; probably because of the wrong answer I associated it with VSCode today. I think my first comment is relevant - most likely the file extension isn't correct. Or they used @tailwind instead of @import "tailwindcss". Similar trivial mistakes cause this, since the plugins are compatible with both v3 and v4. Commented Sep 14 at 10:50
  • But we haven't received more information for this since September 8. I think this will remain a dead question. Commented Sep 14 at 10:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.