# Tailwind CSS v4 — Utility-First CSS Framework
> The most popular utility-first CSS framework, now with v4 engine rewritten in Rust. 10x faster builds, automatic content detection, and zero-config setup. 90,000+ GitHub stars.
## Install
Save in your project root:
## Quick Use
```bash
# New project
npm install tailwindcss @tailwindcss/vite
```
```css
/* app.css */
@import "tailwindcss";
```
```html
Alice Johnson
Software Engineer
```
No config file needed — Tailwind v4 auto-detects your content files.
---
## Intro
Tailwind CSS is the most popular utility-first CSS framework with 90,000+ GitHub stars. Version 4 features a new engine rewritten in Rust delivering 10x faster builds, automatic content detection (no `tailwind.config.js` needed), and CSS-first configuration. Instead of writing custom CSS, compose designs with utility classes like `flex`, `p-4`, `text-lg`, and `bg-blue-500`. AI coding tools like Cursor, v0, and Claude Code generate Tailwind by default. Best for any web project that wants rapid, consistent styling. Works with: React, Vue, Svelte, Next.js, Astro, any HTML. Setup time: under 1 minute.
---
## What Changed in v4
| Feature | v3 | v4 |
|---------|----|----|
| Config | `tailwind.config.js` | CSS-first `@theme` |
| Content detection | Manual `content: [...]` | Automatic |
| Build speed | Fast | 10x faster (Rust) |
| Custom values | Config file | `text-[14px]` inline |
| Dark mode | `darkMode: 'class'` | Automatic |
### Zero-Config Setup
```css
/* Just import — no config file needed */
@import "tailwindcss";
```
Tailwind v4 automatically finds and scans your template files.
### CSS-First Configuration
```css
@import "tailwindcss";
@theme {
--color-brand: #3b82f6;
--font-display: "Inter", sans-serif;
--breakpoint-3xl: 1920px;
}
```
### Common Patterns
**Card:**
```html
```
**Responsive Grid:**
```html
```
**Flex Layout:**
```html
Left
Right
```
### AI-Native
Tailwind is the default styling output for AI tools:
- **v0.dev** generates Tailwind + shadcn/ui
- **Cursor** writes Tailwind when asked for styling
- **Claude Code** uses Tailwind in web projects
- **Bolt.new** defaults to Tailwind
### Key Stats
- 90,000+ GitHub stars
- v4 engine rewritten in Rust
- 10x faster builds
- Zero-config automatic detection
- AI tools' default CSS framework
### FAQ
**Q: What is Tailwind CSS?**
A: A utility-first CSS framework where you style elements with classes like `flex`, `p-4`, `text-lg` instead of writing custom CSS. Version 4 is 10x faster with zero config.
**Q: Is Tailwind free?**
A: Yes, fully open-source under MIT license.
**Q: Do I still need tailwind.config.js in v4?**
A: No, v4 uses CSS-first configuration with `@theme` and automatic content detection. Config files are optional.
---
## Source & Thanks
> Created by [Adam Wathan](https://github.com/adamwathan) and [Tailwind Labs](https://github.com/tailwindlabs). Licensed under MIT.
>
> [tailwindcss](https://github.com/tailwindlabs/tailwindcss) — ⭐ 90,000+
Thanks for making CSS productive and AI-friendly.
---
## 快速使用
```bash
npm install tailwindcss @tailwindcss/vite
```
```css
/* app.css */
@import "tailwindcss";
```
无需配置文件,v4 自动检测内容文件。
---
## 简介
Tailwind CSS 是最流行的实用优先 CSS 框架,GitHub 90,000+ stars。v4 引擎用 Rust 重写,构建快 10 倍,零配置自动检测。AI 工具(v0、Cursor、Claude Code)默认输出 Tailwind。
---
## 来源与感谢
> Created by [Tailwind Labs](https://github.com/tailwindlabs). Licensed under MIT.
>
> [tailwindcss](https://github.com/tailwindlabs/tailwindcss) — ⭐ 90,000+
---
Source: https://tokrepo.com/en/workflows/46f11f5d-bec2-46b8-89ba-fee11a265142
Author: AI Open Source