Frontend & Design · Tailwind Labs

Tailwind CSS

Utility-first CSS — compose styles right in your markup, kill specificity wars and ship a stylesheet the browser barely notices.

Visit tailwindcss.com
CategoryPricingCompanyOfficial siteBest for
Frontend & DesignFreeTailwind Labstailwindcss.comTeams who want consistent, fast UI styling without writing or naming custom CSS

What it is

Tailwind CSS is a utility-first CSS framework. Instead of inventing semantic class names and then writing the rules they point at, you compose tiny single-purpose utilities — flex, pt-4, text-slate-600 — directly in your HTML or JSX. The build scans your templates, keeps only the utilities you actually used, and emits a stylesheet that’s usually a few kilobytes gzipped.

It’s open source (MIT), built by Tailwind Labs, and it’s become the default styling layer for a huge slice of the React/Vue/Svelte world. Version 4 rewrote the engine in Rust with a CSS-first configuration file, dropping the old JavaScript config for most setups.

What it actually does

Tailwind gives you a design system as classes: a spacing scale, a color palette, typography, breakpoints, dark-mode variants and state variants like hover: and focus:. You style elements inline-ish, co-located with the markup, so refactoring a component never means hunting down a 400-line stylesheet for orphaned selectors.

<!-- A card, no custom CSS written -->
<div class="max-w-sm rounded-xl border border-slate-200 p-6 shadow-sm dark:border-slate-700">
  <h3 class="text-lg font-semibold text-slate-900 dark:text-slate-100">Deploy status</h3>
  <p class="mt-2 text-sm text-slate-600 dark:text-slate-400">All systems green across 3 regions.</p>
  <button class="mt-4 rounded-md bg-teal-600 px-4 py-2 text-sm font-medium text-white hover:bg-teal-700">View logs</button>
</div>

How it compares to alternatives

vs vanilla CSS. Plain CSS with custom properties is perfectly respectable and you should know it cold. But hand-rolled stylesheets drift: naming bikesheds, dead rules, specificity escalations. Tailwind trades a naming problem for a verbosity one and adds constraints (a fixed scale) that keep teams consistent. If your team writes careful BEM and you love it, don’t let anyone convert you.

vs Bootstrap. Bootstrap ships pre-made components (.btn, .navbar) you override; Tailwind ships barely-any-components and expects you to build your own from utilities. Bootstrap is faster for an admin panel on Tuesday afternoon; Tailwind scales better into a real design system without an override war.

Pricing and free tier

Free. MIT-licensed, no paid tier for the framework itself. Tailwind Labs makes money on Tailwind Plus (paid UI component packs and templates) and the commercial Refactoring UI book/videos — both optional. No seats, no usage caps, no phone-home.

Where it shines / where it doesn’t

Shines: component-driven UIs, rapid iteration, team consistency via the default scale, dark mode, and tiny production CSS because unused utilities are purged automatically. Prototyping that doesn’t get thrown away.

Doesn’t: HTML that must stay pristine for non-frontend readers, teams allergic to long class attributes, highly dynamic style values that fight the fixed scale, and projects where designers hand over pixel-perfect static comps that were easier to do with plain CSS anyway.

Getting started in 3 minutes

npm i -D tailwindcss @tailwindcss/vite
# add the plugin to vite.config.ts, then in your CSS:
@import "tailwindcss";
# and ship it. For a CDN prototype, drop in the Play CDN script tag.

Run npm run dev, sprinkle classes on any element, and you’re styled. The official docs are excellent and include an interactive playground.

60-second verdict checklist

  • Can I run it locally or only hosted? Yes to hosted-only is a constraint, not a dealbreaker.
  • Is the free tier enough to prove value on one real project before paying?
  • Does it replace a tool I already pay for, or just add a tab?

A note on team adoption

Roll Tailwind out with the design team in the room: agree on the scale, wire @theme to your brand tokens, and convert one shared component library first. Adoption sticks when the first week produces obvious wins, and it dies when half the codebase uses utilities and half uses legacy BEM. One migration owner, one style guide page, one lint rule banning raw hex values — that’s the whole change-management plan.

Three mistakes teams make

First, @apply-ing everything into component classes and re-creating the exact cascade problem you adopted Tailwind to escape — keep utilities in the markup, extract components, not CSS. Second, hand-editing generated CSS or fighting the build with !important instead of using Tailwind’s own layers and variants. Third, ignoring the config: defining brand colors and spacing as CSS variables in @theme turns “magic hex codes” into a real design system, and skipping that step is why some teams end up with text-[#1a2b3c] scattered everywhere.

PeaBox fit

This very site — PeaBox Lab — is styled with a hand-tuned stylesheet because the atlas pages predate the migration; but new PeaBox tools reach for Tailwind by default. If you’re mocking UI in Figma and want the tokens to survive contact with code, map the Figma variables to Tailwind’s theme and your design-to-implementation gap shrinks to nearly zero.

The honest practitioner take

Tailwind is divisive until you try it, then it’s usually just Tuesday. The markup gets noisy — accept that upfront and lean on components for repetition. In exchange you delete the entire category of “where does this class live” and your CSS bundle stops growing with every feature. Pair it with a component library (shadcn/ui, daisyUI) if you don’t want to build every button from scratch, and you’ll wonder why you ever wrote .card__header--large.

Details approximate as of Nov 2026; check tailwindcss.com for current docs.