Packages

tailwind-merge

3.7.1 · 19 Nov 2026MIT118.2M / weekRepositorynpmAtom feed

Your version

0.8.0

21 Oct 2021Where it was published

0.9.0 is the newest release of 0.8.x.

In short

6 breaking5 new1 fixed

  • Breaking

    This is a big release with breaking changes.

  • Breaking

    Previously there was a list of prefixes in the tailwind-merge config which was used to match Tailwind prefixes. I removed those and match all prefixes as valid Tailwind prefixes. This is only a breaking change if you use non-Tailwind classes with : in them which look like Tailwind classes after the prefix. tailwind-merge will treat those as Tailwind classes and resolve conflicts incorrectly. (#50)

  • Breaking

    createTailwindMerge: Doesn't get passed the getDefaultConfig callback anymore. You need to call the exported function getDefaultConfig instead to get the default config. (#42)

  • Breaking

    createTailwindMerge: You probably don't need createTailwindMerge anyway. Use the new and much simpler to use extendTailwindMerge instead. (#49)

  • Breaking

    (Breaking change) Consider all prefixes as valid Tailwind prefixes

  • Breaking

    (Breaking change) Code-split default config out

Release note

Summary

This is a big release with breaking changes. These were necessary to improve the API before the coming v1.0.0 release and to add better plugin support. If you feel like writing a plugin, check out the plugins section in the docs!

Breaking Changes

  • Breaking

    Previously there was a list of prefixes in the tailwind-merge config which was used to match Tailwind prefixes. I removed those and match all prefixes as valid Tailwind prefixes. This is only a breaking change if you use non-Tailwind classes with : in them which look like Tailwind classes after the prefix. tailwind-merge will treat those as Tailwind classes and resolve conflicts incorrectly. (#50)

  • Breaking

    createTailwindMerge: If you added custom prefixes to your tailwind-merge config, you can remove them now. If you use TypeScript, you need to remove them. (#50)

  • Breaking

    createTailwindMerge: Doesn't get passed the getDefaultConfig callback anymore. You need to call the exported function getDefaultConfig instead to get the default config. (#42)

  • Breaking

    createTailwindMerge: You probably don't need createTailwindMerge anyway. Use the new and much simpler to use extendTailwindMerge instead. (#49)

New Features

  • Add plugin documentation

  • Breaking

    (Breaking change) Consider all prefixes as valid Tailwind prefixes

  • Add extendTailwindMerge function

  • Add mergeConfigs function

  • Breaking

    (Breaking change) Code-split default config out

  • Enable multiple createConfig functions

  • Add validators to package exports

Bug Fixes

  • Remove unwated side effects when mutating default config

    • Also added the Config type to the package exports

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.