-
tailwind-merge has to know a lot about tailwind class groups in order to merge classes effectively, but it doesn't expose any of that information. It would be great to have access to a version of the mergeClassList function without the final My use-case would be to split tailwind classes by class group. I want to make a custom const MyInput = props => (
<div>
<input {...props} />
</div>
) The problem with that is that while most classes like This would address #357 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @Rinaldo! 👋 I have two different answers to your message. Here are both: Answer to your feature requestI also thought about it from time to time that it would be useful to expose the low level class info and let people do more custom stuff with it. The challenge lies in how to expose that functionality. Some boundaries I can think of:
An initial idea I have is to attach an twMerge.experimentalRaw('block', true && 'something-else') I'm not 100% sure though. 🤔 Answer to your problemMy usual solution to this is a bit dirty but simple: I use an additional |
Beta Was this translation helpful? Give feedback.
Hey @Rinaldo! 👋
I have two different answers to your message. Here are both:
Answer to your feature request
I also thought about it from time to time that it would be useful to expose the low level class info and let people do more custom stuff with it. The challenge lies in how to expose that functionality.
Some boundaries I can think of:
createTailwindMerge
to preserve memory and CPU cycles. Because the config only exists within that function, the API also needs to be exposed from within that function.