Release Notes
v3.3.0
Highlights
- Fully rewritten in TypeScript with stronger types
- Conflict resolution included in the default build
- Performance improvements
- Optional
tailwindcsspeer dependency
Conflict resolution
Conflict resolution is available on the default tailwind-variants entry. Install only tailwind-variants — you no longer need tailwind-merge for Tailwind Variants.
- Existing
twMergeConfigobjects generally keep working. Prefer{ extend, override }. - The lite entry (
tailwind-variants/lite) still has no merge. - Utilities:
tv,createTV,cn,cnMerge,cx
See the Conflict Resolution page for details and examples.
Breaking / behavior changes
- Passing an explicit empty
slots: {}enables slot mode and returns the implicitbaseslot. Omitslotswhen the component should keep returning a class string. - Extended component metadata types now describe the merged variants / slots / keys exposed at runtime. Slotted components include the implicit
baseslot. Boolean compound conditions acceptundefined. - Installation no longer requires
tailwind-mergefor conflict resolution. - Examples that used
cn(...)(config)should usecnMergeinstead (thecn→cnMergesplit from v3.2.2 remains).
Migration steps
- Remove
tailwind-mergeif it was only used for Tailwind Variants. - Keep using
twMergeConfigas today (extend/overridepreferred). - Use
/liteonly when you intentionally do not want merge.
- npm i tailwind-variants tailwind-merge
+ npm i tailwind-variantsKeep tailwind-merge only if the app still calls it directly (twMerge, extendTailwindMerge, etc.).
For a fuller walkthrough, see the Migration Guide.
Acknowledgements
Conflict resolution draws on ideas and MIT-licensed work from tailwind-merge , clsx , and cnfast .
Last updated on