Internative Logo

What Is Tailwind CSS? The Utility-First CSS Framework

What Is Tailwind CSS? The Utility-First CSS Framework

Writing CSS for a growing product usually goes wrong in the same way. Every new component needs a class name, every class name needs a rule in some stylesheet, and after a year nobody dares delete anything because they cannot tell what still uses it. Tailwind CSS takes a different approach: instead of writing custom CSS for each component, you compose the design in the markup from small, single-purpose classes such as flex, pt-4 and text-center, and Tailwind generates only the CSS those classes need.

This article explains what Tailwind CSS is, how it works, where it fits, why some developers dislike it, and how it compares with Bootstrap and other ways of writing CSS.

What is Tailwind CSS?

Tailwind CSS is an open-source, utility-first CSS framework. It does not give you ready-made components such as cards or navbars. It gives you a large set of utility classes, each of which applies one style, and you combine them directly in your HTML or JSX to build any design. A build step scans your files and produces a stylesheet that contains only the classes you actually use.

The framework was created by Adam Wathan, Jonathan Reinink, David Hemphill and Steve Schoger, and is developed by Tailwind Labs under the MIT licence. Version 0.1.0 was published on 1 November 2017, and 1.0 followed on 13 May 2019. Version 3 made the just-in-time engine the default, generating classes on demand instead of building everything and purging the rest.

Tailwind CSS v4.0, released on 22 January 2025, was a ground-up rewrite. It brought a new engine with full builds up to five times faster and incremental builds over a hundred times faster, configuration written in CSS instead of JavaScript, automatic detection of template files, a first-party Vite plugin and a default colour palette rebuilt in the wider P3 gamut.

How Tailwind CSS works

Utility classes in the markup. A button might be <button class="rounded-lg bg-blue-600 px-4 py-2 font-medium text-white hover:bg-blue-700">. Each class does one thing, and the combination is the design. Because the styles sit next to the markup, you change a component without hunting through stylesheets, and deleting the component deletes its styles.

Variants for states and screens. Prefixes apply a utility only under a condition: hover: and focus: for interaction states, md: and lg: for breakpoints, dark: for dark mode, and container query variants for components that respond to their parent's size.

A scanner and a generator. Tailwind reads your source files, finds the class names you use and generates CSS for exactly those. The result is a small stylesheet, and arbitrary values such as w-[137px] are generated on the fly when the design needs something outside the scale.

Configuration in CSS. In v4 you import Tailwind with a single @import "tailwindcss"; line and define your design tokens with @theme: colours, fonts, breakpoints and spacing become CSS custom properties that are also available at runtime. The tailwind.config.js file from earlier versions is no longer required.

Built on modern CSS. v4 relies on cascade layers, registered custom properties with @property and color-mix(), and uses Lightning CSS for vendor prefixing. In return it targets modern browsers: Safari 16.4, Chrome 111 and Firefox 128 or newer. Projects that must support older browsers are advised to stay on v3.4.

Key features

  • Utility-first classes covering layout, spacing, typography, colour, borders, effects, transitions and more.
  • Responsive, state and dark-mode variants written inline, without media queries in separate files.
  • Design tokens as CSS variables through @theme, so the same values drive utilities and custom CSS.
  • Small production CSS, because only the classes you use are generated.
  • Arbitrary values for one-off measurements without leaving the markup.
  • First-party Vite plugin and a PostCSS plugin for other build setups.

Where Tailwind CSS is used

  • Component-based applications in React, Vue.js, Svelte and similar frameworks, where styles live with each component.
  • Design systems whose tokens are defined once in @theme and applied everywhere through utilities.
  • SaaS products and dashboards that need a custom look and consistent spacing across many screens.
  • Marketing and content sites built with frameworks such as Next.js, where the stylesheet must stay small.
  • Component kits built on top of it, such as shadcn/ui, whose components are styled entirely with Tailwind classes.

When to choose Tailwind CSS, and when not to

Choose Tailwind CSS when:

  • You build with components and want styles to live, change and disappear with them.
  • The product has its own design and you want consistent spacing, colour and type scales enforced by the classes themselves.
  • Several developers work on the same interface and naming conventions for CSS keep breaking down.
  • You want a small production stylesheet without manual cleanup.

Look elsewhere when:

  • You need finished components quickly and the default look is acceptable. A component framework such as Bootstrap gets you there with less design work.
  • The markup is generated by a CMS or written by people who should not edit long class lists. Semantic classes with Sass or plain CSS are easier there.
  • The project must support browsers older than those v4 targets and cannot stay on v3.
  • The team strongly prefers separating structure and style. Tailwind's long class strings are a real readability cost, and forcing them on an unwilling team rarely ends well.

Tailwind CSS and its alternatives

OptionApproachReady-made componentsBest fit
Tailwind CSSUtility classes generated at build timeNo, you compose themCustom designs, component-based apps
BootstrapComponent framework with utilitiesYesStandard screens, admin panels, fast delivery
Sass / LessPreprocessors for hand-written CSSNoSemantic class architectures, existing codebases
CSS ModulesLocally scoped CSS files per componentNoTeams that prefer plain CSS with scoping
UnoCSSOn-demand atomic CSS engineNoTeams wanting a configurable utility engine

The comparison most teams make is Tailwind CSS vs Bootstrap. Bootstrap gives you finished components with a recognisable look; you adjust them with variables and a few utilities. Tailwind gives you no components at all, only the building blocks, so the design is entirely yours and nothing has to be overridden. Bootstrap is faster for standard interfaces built by generalist teams. Tailwind fits better when a product has a designer, a design system and a component-based front end. Tailwind is not replacing Bootstrap everywhere: they answer different needs, and Bootstrap remains a sound choice for server-rendered apps and internal tools.

How we use Tailwind CSS at Internative

We use Tailwind CSS to build interfaces that stay consistent and easy to customise as they grow. Its utility-first approach lets us move quickly, keeps CSS complexity down and holds the design together across large front-end systems. The site you are reading is built with Next.js, shadcn/ui and Tailwind CSS v4.

Two of our published customer stories use it:

  • Nevados, a platform that builds audit workpapers straight from the trial balance, has a Next.js, React and TypeScript front end with shadcn/ui and Tailwind CSS, backed by .NET, MongoDB, Python and a self-hosted language model.
  • RiskConnect, the EHS, 5S and Kaizen field engagement platform we built for Küçükoğlu Holding, pairs a Vue.js and Tailwind CSS web interface, built with Vite, with a .NET and MongoDB backend and a Flutter field app.

If you are building a web product or turning a design into a maintainable front end, our web application development and design-to-code handoff teams can help.

Frequently asked questions

Is Tailwind better than Bootstrap?

Neither is better in general. Tailwind is better for custom designs and component-based front ends, because it gives you building blocks instead of a finished look. Bootstrap is better when you want ready-made components and a consistent default style with little design work, such as admin panels and internal tools.

What are the advantages of Tailwind CSS?

Styles live next to the markup, so changing or deleting a component is safe. The design scale is enforced by the classes, which keeps spacing and colour consistent. Production CSS stays small because only used classes are generated, and responsive, hover and dark-mode styles are written inline with variants.

Why do some developers dislike Tailwind CSS?

The most common complaint is readability: long class lists make markup harder to scan, and the approach mixes structure and style, which some developers see as a step back. There is also a learning curve for the class names. Extracting repeated patterns into components, as libraries such as shadcn/ui do, addresses most of this.

Who created Tailwind CSS?

Tailwind CSS was created by Adam Wathan together with Jonathan Reinink, David Hemphill and Steve Schoger. It is developed by Tailwind Labs, and its first version was published in November 2017.

Is Tailwind CSS free?

Yes. The framework is open source under the MIT licence and free to use in commercial projects. Tailwind Labs also sells Tailwind Plus, a separate collection of UI components and templates, but the framework itself does not require it.

Related services

Where this topic becomes an engagement.

Keep reading

The articles that follow this one.