Packages

tailwind-merge

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

Your version

1.0.0

major10 Dec 2021Where it was published

1.14.0 is the newest release of 1.x.

In short

1 breaking1 new

  • Breaking

    twMerge, extendTailwindMerge: Outline utilities from Tailwind v2 don't get merged anymore since they were replaced by outline width, outline style, outline offset and outline color in Tailwind v3 (#63, #63)

Release note

v1! 🎉

Overview

After being 5 months on v0 I think it's time to release a stable version of tailwind-merge. Tailwind v3 was released yesterday and it's no coincidence that I'm releasing tailwind-merge v1 today. I added full support for Tailwind v3 so you can update both at once.

There are no breaking changes in the tailwind-merge types and some breaking changes for a small number of users in the return values, so you should get through smoothly.

By the way, you can now sponsor this project. 😊

Breaking Changes

  • Breaking

    twMerge, extendTailwindMerge: Outline utilities from Tailwind v2 don't get merged anymore since they were replaced by outline width, outline style, outline offset and outline color in Tailwind v3 (#63, #63)

  • Breaking

    twMerge, extendTailwindMerge: The classes overflow-ellipsis and overflow-clip will not get merged with class truncate anymore, but the new Tailwind v3 classes text-ellipsis and text-clip will. (#63, #63)

  • Breaking

    twMerge, extendTailwindMerge: The classes decoration-slice and decoration-clone won't get merged anymore and box-decoration-slide nad box-decoration-clone will (#63, #63)

  • Breaking

    getDefaultConfig: Removed class group outline since it was removed in Tailwind v3 (#63, #63)

  • Breaking

    getDefaultConfig: Renamed class groups flex-basis, flex-grow and flex-shrink to basis, grow and shrink to stay consistent with Tailwind v3 (#63, #63)

  • Breaking

    validators: isCustomLength and isCustomValue were renamed to isArbitraryLength and isArbitraryValue to be consistent with naming in Tailwind v3 documentation (#63, #63)

New Features

  • Add support for Tailwind v3

    • Support for all the new utility classes and variants in Tailwind v3.0.0

    • Support for arbitrary properties like [--my-var:20px]

    • Support for important modifiers in arbitrary properties like ![--my-very-important-var: 21px]

    • Support for new labels for classes with arbitrary value: size, position, url, weight and family

    • New validators isTshirtSize, isArbitrarySize, isArbitraryPosition, isArbitraryUrl and isArbitraryWeight, check them out in the documentation! (#63, #63, #63)

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.