shadcn and aidenybai open-source cn, a 30x faster Tailwind class merge engine

In early September, shadcn (creator of shadcn/ui) and aidenybai (creator of Million.js) open-sourced cn, a new engine for Tailwind class merging and conflict resolution, positioned as a drop-in replacement for tailwind-merge and clsx. Official benchmarks claim a 30x speedup over tailwind-merge, with a fully aligned API for painless migration.

Confirmed

Why it matters

tailwind-merge and clsx are the de facto standard for class merging in the React/Tailwind ecosystem, underpinning nearly every Tailwind-based component library. By offering order-of-magnitude performance gains and a smaller footprint with the same API, cn allows existing projects to switch at near-zero cost — especially valuable for large UI libraries with frequent re-renders and heavy class computation. With shadcn himself optimizing this foundational layer, the ecosystem may gradually migrate to the new solution.

2026-09-02 ~ 2026-09-03 · 5 related posts

Primary sources

4 near-duplicate retellings: shadcn · aidenybai · stramel89 · SeyoneC