shadcn open-sources cn, a Tailwind class merging engine 30x faster than tailwind-merge

stramel89 · x · 2026-09-03

shadcn and Aiden Bai are open-sourcing cn, a new engine for Tailwind class merging and conflict resolution, a drop-in replacement for tailwind-merge and clsx. It works with all frameworks, runs everywhere, and is 30x faster than tailwind-merge.

In the thread, users asked whether it supports custom Tailwind class merging (tailwind-merge previously only handled default classes); one user reported an 18kb gzipped bundle size increase from the cn config, and the author said it should be optimized and will be fixed.

Related event: shadcn and aidenybai open-source cn, a 30x faster Tailwind class merge engine(5 posts)→

Original post →

More from coding & agent

coding & agent channel →