PHPackages                             michtio/tailwind-merge-v4 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. michtio/tailwind-merge-v4

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

michtio/tailwind-merge-v4
=========================

Drop-in fork of tales-from-a-dev/tailwind-merge-php with a widened psr/simple-cache constraint so it can coexist with Craft Commerce (which transitively pins psr/simple-cache ^1.0 via ibericode/vat).

v0.3.0.1(3w ago)01621MITPHPPHP &gt;=8.1

Since Nov 20Pushed 3w agoCompare

[ Source](https://github.com/michtio/tailwind-merge-v4)[ Packagist](https://packagist.org/packages/michtio/tailwind-merge-v4)[ Docs](https://github.com/michtio/tailwind-merge-v4)[ RSS](/packages/michtio-tailwind-merge-v4/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (7)Used By (1)

Note

This project is a fork from [tailwind-merge](https://github.com/gehrisandro/tailwind-merge-php) by [Sandro Gehri](https://github.com/gehrisandro). Read the [UPGRADE](UPGRADE.md) guide for upgrading to this package.

[![Tests](https://camo.githubusercontent.com/4db4c07a5296f46688eadc9329b9db02919e7287a052c21cc09340b42c300e38/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f74616c65732d66726f6d2d612d6465762f7461696c77696e642d6d657267652d7068702f63692e796d6c3f6c6162656c3d7465737473267374796c653d666f722d7468652d6261646765)](https://github.com/tales-from-a-dev/tailwind-merge-php/actions/workflows/ci.yml)[![PHP Version](https://camo.githubusercontent.com/32f92c123238cda9e6ea70bd553e28012095e121b5d26a44a5a1eed9378dcf67/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e312d3466356239332e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/32f92c123238cda9e6ea70bd553e28012095e121b5d26a44a5a1eed9378dcf67/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d382e312d3466356239332e7376673f7374796c653d666f722d7468652d6261646765)[![Tailwind Version](https://camo.githubusercontent.com/1f45453df61dd57bd7f3fd0163c4c6f0b04adf6f1304e212368ad3787bdbca3e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7461696c77696e642d2533453d342e302d3030626366662e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/1f45453df61dd57bd7f3fd0163c4c6f0b04adf6f1304e212368ad3787bdbca3e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7461696c77696e642d2533453d342e302d3030626366662e7376673f7374796c653d666f722d7468652d6261646765)[![Packagist Version](https://camo.githubusercontent.com/175efc631fc21f440fdf19c09c5deb13a31a737619adb50bb6cf3022abe9fb05/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74616c65732d66726f6d2d612d6465762f7461696c77696e642d6d657267652d7068703f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/tales-from-a-dev/tailwind-merge-php)[![License](https://camo.githubusercontent.com/7a031a37553caa350b42e088a1a8bfa0e8569f69ed153daca534432ac39db822/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f74616c65732d66726f6d2d612d6465762f7461696c77696e642d6d657267652d7068703f7374796c653d666f722d7468652d6261646765)](https://github.com/tales-from-a-dev/tailwind-merge-php/blob/main/LICENSE)

---

**TailwindMerge for PHP** allows you to merge multiple [Tailwind CSS](https://tailwindcss.com/) classes and automatically resolves conflicts between classes by removing classes conflicting with a class defined later.

A PHP port of [tailwind-merge](https://github.com/dcastil/tailwind-merge) by [dcastil](https://github.com/dcastil).

Supports Tailwind **v4.0** up to **v4.3**

Documentation
-------------

[](#documentation)

The bulk of the documentation is stored in the [`docs`](docs/index.md) directory of this bundle:

Table of Contents
-----------------

[](#table-of-contents)

- [Prerequisites](docs/index.md#prerequisites)
- [Installation](docs/index.md#installation)
- [Usage](docs/index.md#usage)
- [Cache](docs/index.md#cache)
- [Configuration](docs/index.md#configuration)

Credits
-------

[](#credits)

- [Sandro Gehri](https://github.com/gehrisandro)
- [Romain Monteil](https://github.com/ker0x)
- [All contributors](https://github.com/talesfromadev/twig-tailwind-extra/graphs/contributors)

License
-------

[](#license)

This package is under the MIT license.
For the whole copyright, see the [LICENSE](LICENSE) file distributed with this source code.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance94

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 53.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~43 days

Total

5

Last Release

27d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7d5b4ecc0f3577f5a56f8411148e5d35d76e31593ff8529146acae89c5ad321?d=identicon)[michtio](/maintainers/michtio)

---

Top Contributors

[![gehrisandro](https://avatars.githubusercontent.com/u/25097194?v=4)](https://github.com/gehrisandro "gehrisandro (37 commits)")[![ker0x](https://avatars.githubusercontent.com/u/5331654?v=4)](https://github.com/ker0x "ker0x (30 commits)")[![mr-chetan](https://avatars.githubusercontent.com/u/56998650?v=4)](https://github.com/mr-chetan "mr-chetan (1 commits)")[![WebMamba](https://avatars.githubusercontent.com/u/32077734?v=4)](https://github.com/WebMamba "WebMamba (1 commits)")

---

Tags

phpmergeclassestailwindcss

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/michtio-tailwind-merge-v4/health.svg)

```
[![Health](https://phpackages.com/badges/michtio-tailwind-merge-v4/health.svg)](https://phpackages.com/packages/michtio-tailwind-merge-v4)
```

###  Alternatives

[gehrisandro/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

1391.7M12](/packages/gehrisandro-tailwind-merge-php)[tales-from-a-dev/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

11312.6k9](/packages/tales-from-a-dev-tailwind-merge-php)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

340790.3k27](/packages/gehrisandro-tailwind-merge-laravel)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

377559.7k85](/packages/flow-php-etl)[florianv/exchanger

PHP exchange rate provider layer for currency conversion: 30 services, chain fallback, and caching.

1854.9M19](/packages/florianv-exchanger)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

84735.1k](/packages/flow-php-flow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
