Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Smiffy's avatar

PHPStorm and autocompetion for tailwind classes

Recently been trialling PHPStorm and am loving it. One thing which is a bit of a pain is the Tailwind class autocompletion. I am provided with a list of avavilable classes if I use @apply in my app.css but not when I add classes in to the class attribute of a html element in a blade file. Is there some further configuration I need to do/can do to make this work? I have the bundled "Tailwind CSS" and "Tailwind CSS Smart Completion" plugins installed and enabled (have also tried combinations of whether these are active or not). Any help appreciated! I'm using Ubuntu if that helps.

0 likes
8 replies
Smiffy's avatar

@click Thanks. I've been through these steps. To reiterate, it is working in my css file - but not in my blade file.

click's avatar

@Smiffy That is odd, no autocompletion at all? Or only the ones that you already used before?

Edit; there was an issue with it in older PHPStorms, according to this ticket it should work if you set the correct node interpreter, see the screenshot in the comments. https://youtrack.jetbrains.com/issue/WEB-48619

Edit 2; you probably use the latest tailwind version with the JIT compiler, they had more problems with that auto complete but the ticket is marked as fixed. You might be able to find a solution in one of the tickets. But one thing for sure is that you have to set your node interpreter, if not already done.

https://youtrack.jetbrains.com/issue/WEB-50318 https://youtrack.jetbrains.com/issue/WEB-53365 https://youtrack.jetbrains.com/issue/WEB-52736

Smiffy's avatar

I get the full auto-completion when I use @apply in my my css. This is working perfectly. The issue is that it doesn't provide auto-complete in blade files. Is there a way to tell PHPStorm - "Yes I'd like autocompletion for tailwind in these files"?

Smiffy's avatar

Okay. Getting a bit further. So when I compile my assets, PHPStorm is providing me options for any classes that have already been generated as options in my blade file. However the css file is providing me with all options available from Tailwind.

brezanac's avatar

The main issue with the TailwindCSS plugin provided by Jetbrains is that it's simply incredibly unrealiable and prone to all kinds of issues, especially when a new version of TailwindCSS is released.

As frustrating as it might be, I found it wise to only update the plugin once the new version has been thoroughly tested against the lastet version of TailwindCSS.

arneg's avatar

Seems the problem is stay the same for me. Latest PHPStorm. Only autocomplete only works in .css file (with or without @apply).

Please or to participate in this conversation.