DEV Community

Jaime Rios
Jaime Rios

Posted on • Updated on

How to enable Tailwind Intellisense on TSX Files

Intro

I've started to experiment with Tailwind, so while setting up my environment when I had this issue, so here is how to setup intellisense on TSX files in nutshell.

Step 1.

Before getting setting up Intellisense, you will need to install Tailwind in your project.

Step 2.

Install the Tailwind CSS IntelliSense extension for Visual Studio Code.

Step 3.

If you don't have it already, setup a tailwind.config.js file in your root folder by running:

npx tailwindcss init
Enter fullscreen mode Exit fullscreen mode

Step 4.

Go to VS Code settings, and add the following configuration:

// settings.js
// ...
"tailwindCSS.includeLanguages": { 
  "plaintext": "javascript" 
}
Enter fullscreen mode Exit fullscreen mode

Step 5.

Reload VS Code. My favorite way to do it is to press CMD + P and select Reload Window.

That's all folks.

Top comments (0)