Is there an existing issue that is already proposing this?
🪄 describe your feature or idea
Our codebase has frequent Tailwind CSS class merging conflicts, and clsx usage with conditional logic in class strings is cumbersome. I suggest adding a simple utility like cn, which combines clsx and tailwind-merge to streamline Tailwind class management.
We don’t need to install the cn package from SGLara, as it’s a lightweight module we can easily implement ourselves.
Proposed Solution:
- Create a small
cn-like utility function using clsx and tailwind-merge to handle conditional classes and resolve conflicts.
- Update components to use this utility for cleaner class handling.
Benefits:
- Reduces class merge conflicts.
- Simplifies conditional class logic.
- Improves code readability.
Is there an existing issue that is already proposing this?
🪄 describe your feature or idea
Our codebase has frequent Tailwind CSS class merging conflicts, and
clsxusage with conditional logic in class strings is cumbersome. I suggest adding a simple utility likecn, which combinesclsxandtailwind-mergeto streamline Tailwind class management.We don’t need to install the
cnpackage from SGLara, as it’s a lightweight module we can easily implement ourselves.Proposed Solution:
cn-like utility function usingclsxandtailwind-mergeto handle conditional classes and resolve conflicts.Benefits: