unstale

npm / tailwind-merge

tailwind-merge

What changed in tailwind-merge 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-04.

13 breaking1 security3 new APIs and options1 performance7 behavior and defaults1 tooling15 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

tailwind-merge 328 changes

Breaking changes 9

  • Classes removed in Tailwind CSS v4 are no longer supported by tailwind-merge.

    3.0.0release notes

  • Custom separators are no longer supported.

    3.0.0release notes

  • The type union now consists of different string literals than before.

    3.0.0release notes

  • The isLength validator was removed and split into isNumber and isFraction.

    3.0.0release notes

  • A mandatory orderSensitiveModifiers property is required in config when using createTailwindMerge.

    3.0.0release notes

  • A prefix defined in config should no longer include the combining - character.

    3.0.0release notes

  • Tailwind CSS v3 prefix position in classes is no longer supported; use the Tailwind CSS v4 position.

    3.0.0release notes

  • tailwind-merge drops Tailwind CSS v3 support and adds Tailwind CSS v4 support; upgrade both together.

    3.0.0release notes

  • Theme scales keys changed to match the Tailwind CSS v4 theme variable namespace exactly.

    3.0.0release notes

New APIs and options 2

  • Theme getters now expose the referenced theme key so tooling can identify the theme scale without calling the getter.

    3.7.0release notes

  • Adds a config option for Tailwind utilities where a slash is part of the full class name, such as named container queries.

    3.6.0release notes

Performance 1

  • Performance optimizations make tailwind-merge more than 10% faster.

    3.4.0release notes

Behavior and default changes 5

  • Adds support for readonly array values in the technology's accepted inputs.

    3.6.0release notes

  • Adds support for Tailwind CSS v4.3 utilities, including utilities whose full class name contains a slash.

    3.6.0release notes

  • Adds support for Tailwind CSS v4.2, allowing tailwind-merge to handle its class names and utilities.

    3.5.0release notes

  • tailwind-merge adds support for arbitrary CSS variable syntax.

    3.0.0release notes

  • tailwind-merge supports the new important modifier position at the end of a class.

    3.0.0release notes

Fixes and other changes 11

  • Bare bg-conic now merges correctly with other background image classes.

    3.7.0release notes

  • Arbitrary values using color() are now classified as colors instead of lengths.

    3.7.0release notes

  • columns-auto now conflicts correctly with other columns classes.

    3.7.0release notes

  • Container sizes such as inline-2xl now merge correctly.

    3.7.0release notes

  • leading-none is no longer removed when the leading theme scale is overridden.

    3.7.0release notes

  • Arbitrary values using light-dark() are now classified as colors instead of lengths.

    3.7.0release notes

  • max-h-none is now included in the max-h class group.

    3.7.0release notes

  • Axis shorthand px now overrides logical sides such as ps correctly.

    3.7.0release notes

  • Deprecated shadow-inner is now classified as a shadow instead of a shadow color.

    3.7.0release notes

  • Prevents arbitrary font-family and font-weight values from merging incorrectly.

    3.4.1release notes

  • Order-sensitive modifiers such as before: are now correctly treated as order-sensitive.

    3.0.0release notes

tailwind-merge 213 changes

Breaking changes 4

Security 1

  • This release is published from CI with npm provenance again, so installs of tailwind-merge@^2 resolve to an attested version.

    2.6.2release notes

New APIs and options 1

  • An ES5 bundle is added for developers who need that bundle target.

    2.0.0release notes

Behavior and default changes 2

  • Available configuration keys have stricter types and can be configured through generics.

    2.0.0release notes

  • The API can now be used to override elements.

    2.0.0release notes

Tooling 1

  • The library is transpiled to more modern JavaScript.

    2.0.0release notes

Fixes and other changes 4

  • Arbitrary values using color-mix are now detected as colors by tailwind-merge.

    2.6.1release notes

  • Background-image and background-position classes are merged correctly; arbitrary background-position and background-size values need labels because their values can look similar and share the bg- prefix.

    2.0.0release notes

  • Number validators no longer return true for empty strings.

    2.0.0release notes

  • Touch action classes no longer override each other incorrectly.

    2.0.0release notes