tailwindcss
Utility-first CSS framework — compose designs directly in markup with small, single-purpose class names.
Writing CSS means constantly context-switching between HTML and CSS files, naming things (what do you call this div?), and fighting specificity wars. Component-scoped CSS still means maintaining a separate styling system. Designs drift as CSS grows.
Tailwind replaces CSS files with a vocabulary of utility classes directly in your HTML. Instead of `.card { padding: 1rem; border-radius: 0.5rem; }` you write `class='p-4 rounded-lg'`. The design system (spacing, colors, typography) is defined once in config — every class enforces it.
Install Tailwind CSS v4 in a Next.js project
npm install tailwindcss @tailwindcss/postcss
export default { plugins: { '@tailwindcss/postcss': {} } }
@import 'tailwindcss';
<button className='bg-indigo-600 hover:bg-indigo-700 text-white font-semibold px-4 py-2 rounded-lg transition-colors'>
Click me
</button>Use it when
Any web project where you control the markup. Especially powerful with component frameworks (React, Vue, Svelte). Rapid prototyping, design systems, teams that want consistency without writing CSS.
Skip it when
When you don't control the HTML (CMS-generated content). Projects with existing CSS codebases where a migration isn't worth it. Developers who strongly prefer semantic CSS.
Ready to explore the full API?
See every class, function, and relationship in an interactive graph.