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/LICENSE3. Used by agents' projects
Dependency in 2,040 public GitHub projects set up for AI coding agents that we scanned (32.6%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
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
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
Often used with
Tailwind CSS in practice
Strengths
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."
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>.
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.
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
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.
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
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
Head to head
- Tailwind CSS vs Sass used together in 59 projects
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
Alternatives
Tailwind CSS This page
Pick Sass when you prefer separate stylesheets with variables, nesting and mixins over classes in the page.
Pick Emotion when you want styles written inside React components as JavaScript, scoped to each component.
Pick vanilla-extract when you want styles written in TypeScript files that turn into plain CSS at build time.
CSS-in-JS library for styling React components with dynamic scoped styles.
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.”
Install Tailwind and its Vite plugin.
npm install tailwindcss @tailwindcss/viteAdd the plugin to vite.config.ts, then import Tailwind in your main CSS file.
@import "tailwindcss";Run the dev server and use the classes in your pages.
npm run dev
Rules for your agent
## 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
Version 4 replaced the @tailwind lines with a normal CSS import.
Tailwind reads files as plain text, so a class name assembled at runtime never gets its styles.
v4 no longer finds the JavaScript config by itself.
The Play CDN is meant only for trying things out.
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.