joe-bell / cva

Class Variance Authority
https://cva.style
Apache License 2.0
5.78k stars 110 forks source link

How to make tailwind intellisense work inside variants object. #267

Closed lorcan-codes closed 8 months ago

lorcan-codes commented 8 months ago

Hi, thank you for creating this library.

I followed this instruction to make tailwind intelissense work with cva.

While it is working for cva simple inputs such as cva("tailwind classes here") and cva(["tailwind", "classes, "here"]). The intellisense is not working inside variants. For example I don't get any intellisense inside variant.h1 below.

cva("text-foreground", {
    variants: {
        variant: {
            h1: "font-inter font-extrabold leading-[var(--line-height-h1)] tracking-[length:var(--letter-spacing-h1)]",
        }
    },
})

Is there any way to make intellisense work inside variants configuration?