tailwind-variants icon indicating copy to clipboard operation
tailwind-variants copied to clipboard

V1 not compatible with TailwindCSS 3.x due to tailwind-merge version bump

Open jaydiablo opened this issue 8 months ago • 4 comments

We upgraded tailwind-variants to the 1.0 release (and subsequently bumped tailwind-merge to match the dependency defined, which is 3.0.x) and discovered that conflicting classes weren't being removed as they were previous to the upgrade.

In tailwind-merge's README it mentions that if you're using Tailwind 3.x, to stay on the 2.x version:

Image

Perhaps it's worth mentioning this in the README of this project, or in the documentation site?

jaydiablo avatar Apr 02 '25 15:04 jaydiablo

@winchesHe please clarify this on the docs

jrgarciadev avatar Apr 13 '25 03:04 jrgarciadev

tailwind-variants v2 has no more an explicit dependency on tailwind-merge, so I hoped it would resolved this issue. That is not the case, because it still does have it as an optional dependency >=3.0.0. So, attempting to install tailwind-merge v2.6.0 along tailwind-variant v2.0.1 fails.

So, it seems tailwind-variants 1.0.0 breaks the support of the merge feature for Tailwing v3 users. Can this be documented or fixed please?

fredericDelaporte avatar Jul 29 '25 14:07 fredericDelaporte

I'm on tailwind-variants v3 with tailwind-merge v2.6.0 and it seems to be working fine -- the unmet peer dependency is a warning, it doesn't really effect the usage of the lib from what I can tell.

Redmega avatar Oct 27 '25 20:10 Redmega

I'm wondering if tailwind-variants v3.x is actually compatible with TailwindCSS v3 ?

hoywu avatar Nov 08 '25 11:11 hoywu

Thanks, fixed https://github.com/heroui-inc/tailwind-variants/commit/77b91520e2ee0d61e17d13b1a9646f6c9b61c5c6

jrgarciadev avatar Nov 22 '25 20:11 jrgarciadev

@jrgarciadev I am using tailwind-variants v3.x with tailwind-merge v2.6.0 and have not run into any issues -- are you suggesting I should downgrade to tailwind-variants v0.x? What incompatibility should I expect to run into if I don't? 👀

Redmega avatar Nov 24 '25 17:11 Redmega