tailwind-merge
3.7.1 · 19 Nov 2026MIT118.2M / weekRepositorynpmAtom feed
2.6.2 is the newest release of 2.x.
In short
9 breaking1 new3 fixed1 internal
- Breaking
Fix
background-imageandbackground-positionbeing merged incorrectly - Breaking
Make types of available keys more strict and configurable through generics
- Breaking
Make it possible to override elements with
extendTailwindMerge - Breaking
Separate validators better
- Breaking
Make
conflictingClassGroupModifiersin config non-optional - Breaking
Move separator to config
- Breaking
Remove
modulefield from package.json - Breaking
Remove deprecated exports
Release note
The tailwind-merge v2 release has been sitting here almost finished for 2 months already. But the timing was never quite right, especially thinking about the increased support needed after the release. In the meantime, the product of the company I work at launched in public beta and I married. Thank you for your patience.
This release focuses on making it easier to configure the library for new users. Check out the migration guide and if you have any questions, feel free to create an issue.
Breaking Changes
- Breaking
Fix
background-imageandbackground-positionbeing merged incorrectlyValues for
background-positionandbackground-sizecan look very similar and Tailwind CSS uses the samebg-prefix for both groups. This results in some limitations for tailwind-merge. If you use background position or background size with arbitrary values, please read this section about how to use them.
- Breaking
Make types of available keys more strict and configurable through generics
- Breaking
Make it possible to override elements with
extendTailwindMerge - Breaking
Separate validators better
- Breaking
Make
conflictingClassGroupModifiersin config non-optional - Breaking
Move separator to config
- Breaking
Remove
modulefield from package.json - Breaking
Remove deprecated exports
- Breaking
Transpile lib to more modern JS
New Features
Make types of available keys more strict and configurable through generics
Make it possible to override elements with
extendTailwindMergeSeparate validators better
Make
conflictingClassGroupModifiersin config non-optionalMove separator to config
Remove
modulefield from package.json- Removed
Remove deprecated exports
Transpile lib to more modern JS
Add ES5 bundle
Bug Fixes
Fix touch action classes overriding each other incorrectly
Fix
background-imageandbackground-positionbeing merged incorrectlyFix number validators accidentally returning
truefor empty stringsRename lazy-initializaton.test.ts to lazy-initialization.test.ts
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.