npm / tailwind-variants
tailwind-variants
What changed in tailwind-variants 1 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.
5 breaking2 new APIs and options1 performance3 behavior and defaults3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittailwind-variants 310 changes
Breaking changes 3
Removes responsiveVariants.
cnBase was moved to utils and renamed to cn; the lite version exports cn without any tw-merge logic.
In the lite version, createTV, tv, and cn no longer accept config parameters such as tailwind-merge config.
New APIs and options 2
Adds the cx function for combining classes.
A lite entry point is available without tailwind-merge logic; import from it when you do not use tailwind-merge.
Behavior and default changes 2
twMerge now defaults to true in cn, enabling Tailwind class merging by default.
cnBase now filters and handles various input types and formats output, including removing extra spaces or newlines.
Fixes and other changes 3
Fixes shared-state contamination involving slots.
Updated the cn function type and imported cx from tailwind-variants/lite.
Exports defaultConfig as a value.
tailwind-variants 22 changes
Breaking changes 1
tailwind-merge is no longer bundled and is now an optional peer dependency. Install it separately to use conflict resolution, or disable twMerge if conflict resolution is not needed.
Performance 1
Operations are 37–62% faster for most use cases, with optimized object creation and array operations, reduced function call overhead, and better memory usage.
tailwind-variants 12 changes
Breaking changes 1
withTv has been removed.
Behavior and default changes 1
Tailwind Variants now supports Tailwind CSS v4.