Tailwind CSS v4 launched with a Rust-based engine and a CSS-first configuration model. UnoCSS has been quietly eating into Tailwind's market share with its atomic CSS approach and blazing-fast HMR. I spent three months using both in real projects.
The Core Philosophy Difference
Tailwind CSS v4 is a utility-first framework with an opinionated design system. You configure via CSS @theme directives.
UnoCSS is an atomic CSS engine, not a framework. It generates styles on demand — you define your own rules, or use presets.
Build Performance
| Tool | Cold Build | HMR |
|---|---|---|
| Tailwind v3 | ~800ms | ~120ms |
| Tailwind v4 | ~95ms | ~8ms |
| UnoCSS | ~40ms | ~2ms |
UnoCSS is still faster, but Tailwind v4 has closed the gap dramatically.
Configuration
Tailwind v4 (CSS-native):
@import "tailwindcss";
@theme {
--color-brand: #6366f1;
}
UnoCSS (uno.config.ts):
import { defineConfig, presetWind, presetIcons } from 'unocss'
export default defineConfig({
presets: [presetWind(), presetIcons()],
shortcuts: { 'btn': 'px-4 py-2 rounded bg-brand text-white' },
})
UnoCSS is more powerful but requires more setup. Tailwind's opinionated defaults ship faster.
The Icon System: UnoCSS Wins
The most underrated UnoCSS feature: @unocss/preset-icons.
<div class="i-logos-vue text-4xl" />
<div class="i-carbon-close" />
Any icon from Iconify as a CSS class. No imports, no bundle overhead beyond what's used. Brilliant.
Ecosystem
Tailwind v4: shadcn/ui, Radix, Headless UI — all Tailwind-first. Massive component library ecosystem.
UnoCSS: Exceptional Vite plugin, first-class Nuxt module. Fewer third-party component libraries.
When to Use Each
Choose Tailwind v4 if:
- Using shadcn/ui, Tailwind UI, or Radix
- On Next.js with a large team
- Want maximum community resources
Choose UnoCSS if:
- On Vite/Nuxt/SvelteKit
- Need maximum build performance
- Want icon-as-CSS magic
- Building a custom design system
My Verdict
I use Tailwind v4 for client projects — the ecosystem wins. I use UnoCSS for personal projects where I control the full stack.
Neither is wrong. The best choice is the one your team can maintain six months from now.
Full comparison: dev.Jake blog
Top comments (0)