twl
The cn API with macro compilation for commented Tailwind classes and conflict merging.
What you write
What ships
Newlines and comments
Group class names the way you think about them, annotate the groups, and let the compiler fold it all into one string.
Static templates compile away
A static template becomes a string literal. A static macro template has its tailwind-merge resolved at build time too.
Compiler-only entry
The macro entry contains declarations only. The compiler removes it and imports runtime helpers from twl/runtime.
Every bundler
Vite, Rollup, Rolldown, webpack, Rspack, esbuild and Farm through unplugin — and Turbopack through its own loader.