Directory
clsx + tailwind-merge
Tailwind class utilities
FreeLibraries & build toolinggithub.com
What it is
The two halves of shadcn's
cn() helper. clsx joins class names conditionally; tailwind-merge (v3) then resolves Tailwind conflicts so a later px-4 actually overrides an earlier px-2 instead of both landing in the class list.Why it earns a slot
Already in every shadcn project as
lib/utils.ts. Without tailwind-merge, passing a className prop to override a component's padding silently does nothing — the most common Tailwind bug in AI-written components.Know before you commit
tailwind-merge ships its own copy of Tailwind's class groups, so heavy custom theme values may need
extendTailwindMerge to teach it your classes.Getting started
npm install clsx tailwind-merge
Also in Libraries & build tooling
Astro Starlight + Nextra
starlight.astro.build
Framework docs themes
FreeLibraries & build tooling
Free · MIT
Open dossier
Biome
biomejs.dev
Linter + formatter (Rust)
FreeLibraries & build tooling
Free · MIT/Apache-2.0
Open dossier
Chromatic
chromatic.com
Visual regression testing
Free tier + paidLibraries & build tooling
Free tier · Starter $179/mo
Open dossier