In Node.js, I use the “clsx” and “tailwind-merge” libraries to compose Tailwind CSS class names in a clean and organized manner. This helps me avoid long, messy string concatenations and make my code more readable. I’m looking for a similar library or solution for PHP, specifically when using Tailwind CSS in PHP projects.
I’ve looked for a few PHP libraries that claim to provide Tailwind CSS class name composition, but they don’t seem to integrate well with my IDE (PhpStorm, paid version). The class names aren’t auto-suggested or auto-completed, which makes it difficult to write and maintain the code efficiently.
I’m expecting a library or solution that allows me to compose Tailwind CSS class names in a clean, organized, and type-safe manner, similar to how “clsx” and “tailwind-merge” work in Node.js. Additionally, I’d like this solution to integrate well with PhpStorm, providing auto-suggestions and auto-completion for class names.