Tailwind CSS is a utility-first CSS framework that enables rapid UI development by composing small, single-purpose classes directly in markup. Unlike traditional CSS frameworks that provide pre-built components, Tailwind gives you low-level utility classes as building blocksβmaking it infinitely customizable while keeping your CSS lean and maintainable. With v4's CSS-first configuration, Rust-powered Oxide engine, and JIT compilation, Tailwind generates only the styles you use, delivers build times measured in microseconds, and requires nothing but @import "tailwindcss" to get started. What sets Tailwind apart is its mobile-first responsive design system, state-variant modifiers (hover:, focus:, dark:), and deep integration with the modern CSS platform (cascade layers, color-mix(), @property, oklch colors)βletting you handle complex interactions without ever writing custom CSS.
What This Cheat Sheet Covers
This topic spans 28 focused tables and 264 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core Concepts
| Concept | Example | Description |
|---|---|---|
<div class="bg-blue-500 text-white p-4"> | Compose styles using small, single-purpose classes directly in markup instead of writing custom CSS β every class does one thing. | |
<div class="text-sm md:text-lg"> | Apply styles conditionally at breakpoints using prefixes (sm:, md:, lg:, xl:, 2xl:) β mobile-first by default. | |
<button class="hover:bg-blue-700"> | Target interactive states with prefixes like hover:, focus:, active:, disabled: β works on any utility class. | |
<div class="bg-white dark:bg-gray-900"> | Toggle styles for dark themes using dark: variant β supports class-based or media query strategies. | |
@import "tailwindcss"; @theme { --color-brand: #3b82f6; } | In v4, all customization lives in your CSS file β no tailwind.config.js required. @import "tailwindcss" replaces all @tailwind directives. | |
Full build in ~100ms; incremental in ~192Β΅s | On-demand compilation of only the styles you use β enables all variants on all utilities, produces tiny CSS bundles. |