PHPackages                             tales-from-a-dev/tailwind-merge-php - 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. tales-from-a-dev/tailwind-merge-php

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

tales-from-a-dev/tailwind-merge-php
===================================

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

v0.2.0(2mo ago)8172.4k—1.6%18MITPHPPHP &gt;=8.1

Since Nov 20Pushed 2mo agoCompare

[ Source](https://github.com/tales-from-a-dev/tailwind-merge-php)[ Packagist](https://packagist.org/packages/tales-from-a-dev/tailwind-merge-php)[ Docs](https://github.com/tales-from-a-dev/tailwind-merge-php)[ RSS](/packages/tales-from-a-dev-tailwind-merge-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (5)Used By (8)

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.2**

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

47

—

FairBetter than 94% of packages

Maintenance83

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 55.2% 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 ~45 days

Total

3

Last Release

88d ago

### Community

Maintainers

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

---

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 (28 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

cssmergephptailwindtailwindcssphpmergeclassestailwindcss

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tales-from-a-dev-tailwind-merge-php/health.svg)

```
[![Health](https://phpackages.com/badges/tales-from-a-dev-tailwind-merge-php/health.svg)](https://phpackages.com/packages/tales-from-a-dev-tailwind-merge-php)
```

###  Alternatives

[gehrisandro/tailwind-merge-php

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

1391.5M9](/packages/gehrisandro-tailwind-merge-php)[gehrisandro/tailwind-merge-laravel

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

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[nlac/nlsclientscript

Yii ClientScript extension for prevent reloading javascript and merging/minfying resources

208.2k](/packages/nlac-nlsclientscript)[tailwindphp/tailwindphp

A full port of TailwindCSS 4.x to PHP

171.7k1](/packages/tailwindphp-tailwindphp)[arnolem/tailwindphp

TailwindPHP - use Tailwind CSS in your PHP projects (without npm)

131.1k](/packages/arnolem-tailwindphp)

PHPackages © 2026

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