cx
cx is a re-export of clsx. It accepts any number of class values, filters falsy entries, and returns a single concatenated string.
Signature
Parameters
Any number of class values. A Falsy values (
ClassValue is the union:false, null, undefined, 0, "") are ignored.Return value
Astring of space-separated class names.
Usage
StringsUsing cx with defineConfig
When you create a customcx via defineConfig, the onComplete hook runs after all inputs are concatenated. This is how tailwind-merge integration works:
lib/utils.ts
defineConfig for the full configuration API.