Signature
Parameters
ClassValue[]
Any number of class values: strings, arrays, objects, undefined, null, or false.
Returns
A merged class string, orundefined if the result is empty.
Example
How It Works
cn combines clsx for conditional classes with tailwind-merge for conflict resolution.
When to Use
Most of the time, you won’t needcn() directly — styled() handles class merging for you.
Use it when you need to merge classes outside of a styled component: