Skip to content

Instantly share code, notes, and snippets.

@omer-os
Last active February 12, 2025 16:58
Show Gist options
  • Save omer-os/e4c5e82a3518472245460db104b4f8b4 to your computer and use it in GitHub Desktop.
Save omer-os/e4c5e82a3518472245460db104b4f8b4 to your computer and use it in GitHub Desktop.
How to Enable Tailwind CSS IntelliSense for Class-Variance-Authority in Visual Studio Code

How to Enable Tailwind CSS IntelliSense for Class-Variance-Authority in Visual Studio Code

Its just three steps

1- install Tailwind CSS IntelliSense extension

2- create this file .vscode/settings.json

3- copy paste this inside of settings.json

{
  "tailwindCSS.experimental.classRegex": [
    ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
  ]
}

you're done!

@omer-os
Copy link
Author

omer-os commented Apr 3, 2024

I just can't get it to work!

Give me link to your repo

@bennobuilder
Copy link

bennobuilder commented Apr 12, 2024

@nomakSVK
Copy link

thank you, this is exactly what i was looking for

@YahyaWebDev
Copy link

it's not working

@pedroalmeida415
Copy link

@akshay-xp
Copy link

After adding the file, restart the extension for it to work with CVA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment