Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Tailwind CSS

Style pages with short class names.

Styling and CSSNPM

GitHubWebsite

1. License

“to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software”

MIT allows use in paid and closed-source products.

github.com/tailwindlabs/tailwindcss/blob/main/LICENSE

From the package registry and GitHub, checked daily; card checked Nov 10, 2026. Tap a verdict to see its source.How we checkedReport an error

What Tailwind CSS does

Tailwind CSS is a free tool for styling web pages. You or your AI assistant add short class names like p-6 or text-center right on the page elements, instead of writing a separate style file. Tailwind then builds one small style file with only the classes you used.

What people build with it

Style a new React or Vite app

The usual start for an app your assistant builds; one plugin line and one import, and every page can use the classes.

Your brand colors as classes

Add your brand color once, and classes like bg-brand and text-brand appear for buttons, links and badges.

Pages that fit phones and desktops

The same page shows one column on a phone and three on a laptop, by adding a screen size in front of a class.

A dark version of the site

Add dark: in front of a color class, and the page switches colors in dark mode or when your own switch turns it on.

Quick try-out in one HTML file

Test an idea or a layout in a single file with one script line, before setting up a real project.

Styles for a site without Node.js

A plain HTML site, or one made by Python or PHP, gets its style file from Tailwind's single program, with nothing else to install.

Tailwind CSS popularity

92 / 100
Gid Score, #6 overall
19M
downloads a week, npm
98.7K
GitHub stars
2,040
agent projects use it
Tailwind CSS: downloads per weeknpm, tailwindcss 190,135,318
Tailwind CSS: GitHub starstailwindlabs/tailwindcss 98,720

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Tailwind CSS is used

  • Tailwind CSS is a dependency in 2,040 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (41.9% of the 4,867 JavaScript/TypeScript ones), #1 of 53 in styling and css.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 7,817; those are left out of every share on this page.
  • The most used alternative in our scan is Emotion (116 projects).
  • Projects that use it most often also use React (79.6%), Lucide React (59.2%), clsx (58.1%).
  • It is more common in projects set up for Junie (73.0%) than for OpenAI Codex (32.0%).

By coding agent

1,086 projects, 33.1%
983 projects, 32.4%
957 projects, 39.2%
179 projects, 37.8%
150 projects, 32.0%
122 projects, 35.6%
110 projects, 39.4%
54 projects, 73.0%

Often used with

In 79.6% of its projects
In 59.2% of its projects
In 58.1% of its projects
In 56.8% of its projects
In 49.7% of its projects
In 50.9% of its projects
In 72.1% of its projects
In 88.3% of its projects

Tailwind CSS in practice

Strengths

Unused classes never reach production

The site says Tailwind removes all unused CSS when building for production. It claims "most Tailwind projects ship less than 10kB of CSS to the client."

The theme is just CSS variables

Fonts, text sizes and color scales are declared as variables like <code>--font-sans</code> or <code>--color-mint-500</code> inside <code>@theme</code>.

Layers settle specificity

Generated CSS sits in <code>theme</code>, <code>base</code>, <code>components</code> and <code>utilities</code> layers. Your own components go in the <code>components</code> layer. The maintainers say this removes specificity fights.

One prefix pattern for screens, dark mode and containers

A screen size in front of any utility scopes it to a breakpoint. <code>dark:</code> in front of a color applies it in dark mode. Tagging a parent <code>@container</code> lets children use <code>@sm:</code>-style variants.

Watch out for

Shared styles mean repeated class strings

Headings that differ only by color carry the same classes three times. Samantha Ming writes that moving them into a CSS class "kind of defeats the purpose". She avoided it by making a Vue component for anything repeated.

v4.3.3 fixed bugs in the Vite and PostCSS plugins

The v4.3.3 release lists several fixes under "Fixed". Before it, <code>@tailwindcss/vite</code> could trigger full page reloads. <code>@tailwindcss/postcss</code> could also miss rebuilds when Sass changed the input CSS. The same release fixed <code>--watch --poll</code> support in the CLI for unreliable file events. If you hit one of these on an older version, check that release first.

Set theme fonts as CSS variables

@theme {
--font-sans : "Inter" , sans-serif ;
--font-mono : "IBM Plex Mono" , monospace ;
}

More about Tailwind CSS

Funding
  • Own page: https://tailwindcss.com/sponsor

See all

Agent Skills for it
  • tailwindcss: Use when designing/implementing UI with Tailwind CSS (layout, typography, responsive, theming, component patterns). Includes quick recipes a
  • tailwind-css-patterns: Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, ty

See all

Head to head
Packages around it
  • postcss: CSS transform pipeline
  • autoprefixer: Vendor prefixes
  • @tailwindcss/postcss: Tailwind PostCSS plugin
  • @tailwindcss/vite: Tailwind Vite plugin
  • @tailwindcss/typography: Prose styles plugin
  • @tailwindcss/forms: Form styles plugin
More in Styling and CSS

Alternatives

Tailwind CSS This page

MITGid 9219M/wk

Sass

Pick Sass when you prefer separate stylesheets with variables, nesting and mixins over classes in the page.

MITGid 7144.8M/wk

Emotion

Pick Emotion when you want styles written inside React components as JavaScript, scoped to each component.

MITGid 7729.3M/wk

vanilla-extract

Pick vanilla-extract when you want styles written in TypeScript files that turn into plain CSS at build time.

styled-components

CSS-in-JS library for styling React components with dynamic scoped styles.

MITGid 7515.1M/wk

Compare Tailwind CSS with another tool

Get started

Tell your AI assistant

“Set up Tailwind CSS v4 (tailwindcss and @tailwindcss/vite 4.3.5) in this Vite app with @import "tailwindcss" in the main CSS file, put brand colors in an @theme block, and write only complete class names, never ones built from pieces.”

  1. Install Tailwind and its Vite plugin.

    npm install tailwindcss @tailwindcss/vite

    From tailwindcss.com/docs/installation/using-vite

  2. Add the plugin to vite.config.ts, then import Tailwind in your main CSS file.

    @import "tailwindcss";
    

    From tailwindcss.com/docs/installation/using-vite

  3. Run the dev server and use the classes in your pages.

    npm run dev

    From tailwindcss.com/docs/installation/using-vite

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Tailwind CSS
- Style elements by composing utility classes in the markup (`flex`, `pt-4`, `text-center`) instead of writing new CSS rules.
- For responsive styles, prefix a utility with a breakpoint (`sm:`, `md:`, `lg:`, `xl:`). For dark mode, put `dark:` in front of the color utility.
- When children should react to their parent's size, mark the parent `@container` and use variants like `@sm:grid-cols-2`.
- Put theme values (fonts, text sizes, colors) as CSS variables in an `@theme` block, e.g. `--font-sans` or `--color-mint-500`.
- Use `@source` rules to point Tailwind at files it should scan for classes.
- To respect reduced-motion preferences, the `motion-safe` variant can gate an animation; the team's Studio template uses it with Framer Motion's `useReducedMotion` to conditionally disable its navigation menu animation.
- If `@tailwindcss/cli --watch` misses file changes, run it with `--watch --poll[=ms]`.

Mistakes to avoid

@tailwind base; @tailwind components; @tailwind utilities; (v3 lines in a v4 project)
@import "tailwindcss";

Version 4 replaced the @tailwind lines with a normal CSS import.

className={`bg-${color}-600 hover:bg-${color}-500`}
Map each prop value to a full class string: { blue: "bg-blue-600 hover:bg-blue-500", red: "bg-red-600 hover:bg-red-500" }

Tailwind reads files as plain text, so a class name assembled at runtime never gets its styles.

Editing tailwind.config.js in a v4 project and expecting it to load
Put colors, fonts and sizes in @theme inside the CSS file, or load the old file with @config "./tailwind.config.js"

v4 no longer finds the JavaScript config by itself.

Shipping a live site with the Play CDN script tag
Build the CSS with the Vite plugin, PostCSS plugin or Tailwind CLI and link the built file

The Play CDN is meant only for trying things out.

v3 names in a v4 project, like outline-none for a hidden focus outline, ring for a 3px ring, or tailwindcss as a PostCSS plugin
outline-hidden, ring-3, and the @tailwindcss/postcss package

v4 renamed several utilities and moved the PostCSS plugin into its own package.

Questions

Can I use it in a paid product?

Yes. It is MIT-licensed.

Where did tailwind.config.js go in version 4?

Settings now live in your CSS file in an @theme block. An old JavaScript config still works, but only if you load it with @config.

How do I move a project from version 3 to 4?

Run the official upgrade tool on a new branch, then review the changes; it needs Node.js 20 or newer.

Why does a class I added do nothing?

Usually the class name was built from pieces in code, so Tailwind never saw it. Write each full class name, for example in a lookup object.

Can I use it without Node.js?

Yes. The Tailwind command line tool is also offered as a standalone program.