Tailwind CSS
What is Tailwind CSSโ
Tailwind CSS is a utility-first CSS framework that lets you style elements directly in your markup using pre-defined utility classes. It is MIT licensed and currently at version 4.x, with ~49.7M weekly npm downloads and 94.1k GitHub stars. Version 4 is a ground-up rewrite introducing CSS-first configuration, automatic content detection, a built-in Vite plugin, zero-config startup, and 3.5ร faster builds.
Why we recommend itโ
- Rapid prototyping โ go from design to working UI without switching between HTML and CSS files.
- Tiny production bundles โ unused CSS is automatically purged, so you only ship what you use.
- Customizable design system โ extend or override the default theme via CSS variables (v4), keeping design tokens in one place.
- No runtime overhead โ styles are resolved at build time, avoiding the performance penalty of CSS-in-JS solutions.
- Enormous ecosystem โ shadcn/ui, Headless UI, Heroicons, and a wide range of community plugins provide ready-made building blocks.
When to useโ
- React, Next.js, or Vite projects where utility-class styling fits the workflow
- Projects paired with shadcn/ui for a component layer on top of Tailwind
- Design-system-driven projects that benefit from a constrained set of design tokens
- Rapid prototyping where speed to a visual result matters
When NOT to useโ
- Teams that strongly prefer traditional CSS separation (BEM, CSS Modules)
- Legacy projects already invested in a CSS-in-JS library (Styled Components, Emotion)
- Codebases where inline utility classes are considered unacceptable by the team style guide
caution
Tailwind CSS v4 requires Node.js โฅ 20. The migration from v3 to v4 is non-trivial due to the new CSS-first configuration model. Review the v4 upgrade guide before upgrading existing projects.
Resourcesโ
- Official Tailwind CSS docs
- Tailwind CSS GitHub repo
- shadcn/ui โ component collection built on Tailwind