CSS Framework

What is Tailwind CSS

A utility-first CSS framework you style with small classes in your markup instead of writing custom CSS.

Official site

Overview

Tailwind CSS is a utility-first styling framework. Rather than writing custom CSS files and inventing class names, you compose designs directly in your markup from small single-purpose utility classes (like flex, pt-4, text-center). A build step then scans your files and ships only the utilities you actually used, keeping the final CSS tiny.

The approach is polarising but productive: it keeps styling co-located with markup, enforces a consistent design scale (spacing, colour, type), and removes the naming and dead-CSS problems that plague hand-written stylesheets on large projects.

What it is

Tailwind gives you a constrained set of design tokens exposed as utility classes. You build UI by combining them in HTML, configure the design system in one file, and let the build purge everything unused so production CSS stays lean.

  • Utility-first — style in markup, no custom class names
  • Design tokens enforce consistent spacing, colour and type
  • Build-time purge ships only the classes you use

When we reach for it

Tailwind fits projects that want to move fast with a consistent design system and no growing pile of bespoke CSS — landing pages, product UIs, and design-system components. It pairs especially well with React and Next.js work.

Trade-offs

Markup gets verbose — long strings of classes can hurt readability, mitigated with component extraction. There is a learning curve on the class vocabulary, and teams that prefer strict separation of concerns dislike styling in HTML. On this site we use Bootstrap 5, so Tailwind is a tool we apply where it suits, not a house default.

Why it matters

Tailwind CSS is a utility-first CSS framework that has become one of the most popular ways to style modern web applications. Instead of writing custom CSS or using pre-built components, you compose designs directly in your markup from small, single-purpose utility classes (like `flex`, `pt-4`, `text-center`). It matters because this approach dramatically speeds up UI development, keeps styling consistent through a design-system-in-config, and avoids the maintenance problems of large custom CSS files — you rarely leave your HTML, never invent class names, and the styles you are not using are stripped out at build time for a tiny final CSS bundle.

  • A utility-first CSS framework for styling directly in markup
  • Compose designs from small single-purpose classes rather than custom CSS
  • Speeds development, enforces consistency, and produces tiny CSS bundles

Key characteristics

Tailwind provides a large set of utility classes mapped to a configurable design system (spacing, colours, typography, breakpoints), so you build UI by combining utilities in your HTML and customise the system in one config file. Its build step scans your markup and includes only the classes you actually use, so the shipped CSS stays small regardless of the framework's size. The main trade-offs are that markup becomes verbose with many classes (mitigated by component abstraction in your framework), and there is a learning curve to the utility names. In exchange you get speed, consistency, and no more battling a growing, brittle custom stylesheet.

  • Utility classes mapped to a configurable design system in one config file
  • Build step purges unused classes, keeping the final CSS tiny
  • Verbose markup — mitigated by extracting components in your framework
  • Trades a learning curve for speed, consistency and maintainability

When to use it

Tailwind suits teams and projects that value development speed and design consistency and are comfortable styling in markup — it is especially productive with component-based frameworks (React, Vue, Angular) where repeated utility strings are abstracted into components. It is less appealing to those who strongly prefer separating styles from markup, or for very small projects where its build tooling is more setup than needed. The decision is largely stylistic preference plus workflow: for fast, consistent UI work in a component framework, Tailwind is a highly productive default; for teams committed to traditional CSS separation, a different approach may fit better.

  • Best for teams valuing development speed and design consistency
  • Especially productive with component frameworks that abstract utility strings
  • Less suited to those preferring strict style/markup separation
  • A productive default for fast, consistent UI in a component framework

Common questions

Tailwind CSS — questions

Straight answers on how this fits your marketing and build.

Does Tailwind make my CSS bundle huge?
No — the opposite. Tailwind scans your files at build time and ships only the utility classes you actually use, so production CSS is typically small. The full utility set only exists during development.
Is putting all those classes in the HTML bad practice?
It is a deliberate trade-off. Co-locating styles with markup removes naming and dead-CSS problems and keeps a consistent design scale. The verbosity is real; teams manage it by extracting repeated patterns into components.
Does Tailwind produce bloated CSS from all those classes?
No — the opposite. Tailwind's build step scans your markup and includes only the utility classes you actually use, stripping everything else, so the final CSS bundle is typically very small regardless of how many utilities the framework offers. The verbosity is in your markup, not in the shipped stylesheet.
Isn't putting styles in the HTML a bad practice?
It is a deliberate reversal of the traditional separation, and reasonable people differ. In practice, utility classes keep styling co-located with the markup it affects (easier to reason about and change), enforce consistency through a shared design system, and avoid the naming and maintenance problems of large custom stylesheets. Component abstraction handles the repetition. It is a different philosophy, not simply worse.

Still have questions? Talk to a specialist