Installation
Tailwind CSS
If you’re a Tailwind user, here are some additional (optional) steps to get the most out of cva
:
IntelliSense
You can enable autocompletion inside cva
using the steps below:
-
Install the “Tailwind CSS IntelliSense” Visual Studio Code extension
-
Add the following to your
settings.json
:
-
Add the following configuration:
-
Check the version. Available for WebStorm 2023.1 and later
-
Open the settings. Go to Languages and Frameworks | Style Sheets | Tailwind CSS
-
Add the following to your tailwind configuration
Handling Style Conflicts
Although cva
’s API is designed to help you avoid styling conflicts, there’s still a small margin of error.
If you’re keen to lift that burden altogether, check out the wonderful tailwind-merge
package.
For bulletproof components, extend cva
with twMerge
.