PHPackages                             justbetter/laravel-blade-tailwind-merge - 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. justbetter/laravel-blade-tailwind-merge

AbandonedArchivedPackage

justbetter/laravel-blade-tailwind-merge
=======================================

Tailwind classes merging with Laravel Blade components

0.3.0(2y ago)5232MITPHP

Since May 11Pushed 2y ago2 watchersCompare

[ Source](https://github.com/justbetter/laravel-blade-tailwind-merge)[ Packagist](https://packagist.org/packages/justbetter/laravel-blade-tailwind-merge)[ RSS](/packages/justbetter-laravel-blade-tailwind-merge/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

> **Archived as there is a new package which solves the known issues of this package: [tailwind-merge-laravel](https://github.com/gehrisandro/tailwind-merge-laravel)**

Laravel Blade Tailwind Merge
============================

[](#laravel-blade-tailwind-merge)

This package adds a `->tailwind()` method to the attribute bag used within [Blade Components](https://laravel.com/docs/master/blade#component-attributes) which let you overwrite classes.

Example
-------

[](#example)

Let's say you've a Blade "link" component like this:

```
merge(['class' => 'flex px-5']) }}>
   {{ $slot }}

```

When you're using this like:

```
Home

```

You end up with `flex px-5 px-3` instead of `flex px-3`. Because [Tailwind classes are sorted](https://github.com/tailwindlabs/tailwindcss/pull/10382) and `px-5` is listed after `px-3` our "overwrite" won't do anything.

Installation
------------

[](#installation)

```
composer require justbetter/laravel-blade-tailwind-merge

```

Usage
-----

[](#usage)

From the example above, just use `tailwind('...')` instead of `merge(['class' => '...')` or `class('...')` when you need this.

```
tailwind('flex px-5') }}>
   {{ $slot }}

```

Known issues
------------

[](#known-issues)

Currently the merging works only by checking the first part before the dash. So `text-red-500` overwrites `text-xl` and visa versa because we only check for `text-*`. To fix this we need to know all Tailwind options just like [tailwind-merge](https://github.com/dcastil/tailwind-merge) does. Maybe in the future... but a PR is welcome!

References
----------

[](#references)

- [Tailwind Merge](https://github.com/dcastil/tailwind-merge)
- [Pull request to have this within the framework](https://github.com/laravel/framework/pull/45475)
- [Idea from @mpociot on Twitter](https://twitter.com/marcelpociot/status/1310935864848117760)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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 ~62 days

Total

3

Last Release

973d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d00b3f55cd4ae8b8cfb001a644ed6c7a1127a956c24375bcfe16ce12bd89bed?d=identicon)[justbetter](/maintainers/justbetter)

---

Top Contributors

[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (8 commits)")[![indykoning](https://avatars.githubusercontent.com/u/15870933?v=4)](https://github.com/indykoning "indykoning (2 commits)")

### Embed Badge

![Health badge](/badges/justbetter-laravel-blade-tailwind-merge/health.svg)

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

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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