Skip to Content
DocsRelease Notes

Release Notes

v3.3.0

Highlights

  • Fully rewritten in TypeScript with stronger types
  • Conflict resolution included in the default build
  • Performance improvements
  • Optional tailwindcss peer 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 twMergeConfig objects 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 implicit base slot. Omit slots when 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 base slot. Boolean compound conditions accept undefined.
  • Installation no longer requires tailwind-merge for conflict resolution.
  • Examples that used cn(...)(config) should use cnMerge instead (the cncnMerge split from v3.2.2 remains).

Migration steps

  1. Remove tailwind-merge if it was only used for Tailwind Variants.
  2. Keep using twMergeConfig as today (extend / override preferred).
  3. Use /lite only when you intentionally do not want merge.
- npm i tailwind-variants tailwind-merge + npm i tailwind-variants

Keep 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