Here are two utility functions created by merging the power of Joe Bell's class-variance-authority
package, tailwind-merge
, and clsx
.
Combines tailwind-merge
and clsx
into a function that allows for conditional classnames without the worry of Tailwind style conflicts as the output is
ran thru twMerge
to get rid of duplicates.
Takes in a cva instance and returns a function that extends cva's functionality with power of the aforementioned twcx
function.
Could you add an example how to use this? 🙏