What is Tailwind CSS?

A utility-first CSS framework packed with classes like flex, pt-4, and text-center that can be composed to build any design, directly in your markup.

The Utility-First Philosophy

Traditional web development usually involves writing custom CSS classes in a separate stylesheet and applying them to your HTML elements. This forces you to switch context frequently and invent abstract names like .profile-card-header just to style a basic div.

Tailwind CSS flips this model. Instead of writing custom CSS, you apply pre-existing utility classes directly in your HTML. Each class does exactly one thing (e.g., rounded-lg adds border-radius, shadow-md adds a shadow).

The Old Way (Semantic CSS)
.profile-card {
padding: 1.5rem;
background-color: white;
border-radius: 0.5rem;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
<div class="profile-card">
  ...
</div>
The Tailwind Way
/* No custom CSS needed! */
<div class="p-6 bg-white rounded-lg shadow-md">
  ...
</div>

The Just-In-Time Engine

You might be thinking: "Doesn't a framework with a class for everything result in a massive CSS file?"

No! Tailwind uses a Just-In-Time (JIT) compiler. When you run your build script, Tailwind scans your HTML and JavaScript files, looks for the classes you actually used (like `text-center` or `p-4`), and generates only the CSS required for those exact classes. This means your final production CSS bundle is incredibly small—often less than 10kB.

Why Developers Love It

No More Naming

You don't have to invent abstract class names for every single div just to style it.

Zero Context Switching

Design and build at the same time without constantly jumping between HTML and CSS files.

Safe to Change

CSS is global, making it scary to change. Tailwind utilities are local; changing a class won't break other pages.

Tiny Production Build

The JIT engine automatically removes unused CSS, meaning your final CSS bundle is rarely larger than 10kb.