Yuri Osipov · Founder, SEO & analytics

UnoCSS vs Tailwind: Why We Use UnoCSS

UnoCSS vs Tailwind: Why We Use UnoCSS

Both UnoCSS and Tailwind CSS are utility‑first. You write small classes in your markup instead of hand‑written CSS files, and a build step generates exactly the styles you use. The difference is the model: Tailwind is a framework with a large, fixed set of utilities, while UnoCSS is an on‑demand engine that generates utilities from the presets and rules you choose.

This site runs on UnoCSS. Here is an honest, hands‑on comparison — and when Tailwind is still the better call.

In short

What is UnoCSS?

UnoCSS is an atomic CSS engine. It ships no utilities by default — you add presets:

Because utilities come from presets and rules, you can decide exactly which language your CSS speaks. That composability is the core idea — and the source of both its power and its learning curve.

Head‑to‑head

AspectUnoCSSTailwind CSS
ModelOn‑demand engine + presetsUtility framework
Class syntaxNearly identicalUtility classes
Default utilitiesNone (add presets)Large built‑in set
Arbitrary valuesRules + variantsArbitrary values
TypographypresetTypography (.prose)@tailwindcss/typography plugin
ResetBuilt into presetWind4Preflight
Configuno.config.tsCSS‑first @theme or JS config
Theme keysradius, breakpoint, fontborderRadius, screens, …
Best forEngine lovers, smaller outputBatteries‑included teams

Why we chose UnoCSS

We were already writing Tailwind‑style classes, so the migration was mostly mechanical. What we gained:

1. Keep the Tailwind syntax

presetWind4 implements Tailwind v4 semantics, so our components kept working: spacing, colors, opacity modifiers (bg-primary/10) and gradients all resolved the same way. There was no re‑learning of a new utility language.

2. Only ship what you use

UnoCSS generates CSS on demand. Utilities we never reference simply do not exist in the bundle. For a content site with a small, shared design system, that keeps the stylesheet tight.

3. Shortcuts and small components

UnoCSS lets you define shortcuts — reusable class groups — and theme tokens in one config file. Instead of repeating a long class string, we define it once.

4. First‑class Astro integration

UnoCSS has an official Astro integration, so it plugs into Astro’s Vite pipeline with a single line and picks up classes from .astro, .tsx and Markdown files.

Is UnoCSS actually faster in 2026?

Short answer: for development, both are essentially instant on a modern machine. Build times depend far more on your framework, your dependencies and your Markdown than on the CSS engine.

The honest advantages are bundle size (nothing unused is generated) and control (you define your own vocabulary). If you are choosing purely on “build speed”, measure your own project — the difference is rarely the bottleneck.

When Tailwind is still better

We are not dogmatic. Tailwind is the better choice when:

For our own web development work, UnoCSS matched how we like to build. For many teams, Tailwind will be the lower‑risk default.

How we run it with Astro

UnoCSS installs as a Vite/Astro integration. The config file defines the presets and our design tokens:

// uno.config.ts
import { defineConfig, presetWind4, presetTypography } from 'unocss'

export default defineConfig({
  presets: [
    presetWind4({ preflights: { reset: true } }),
    presetTypography({
      cssExtend: {
        p: { color: 'var(--muted-foreground)' },
        a: { color: 'var(--primary)' },
      },
    }),
  ],
})

Then enable the integration in astro.config.mjs:

// astro.config.mjs
import { defineConfig } from 'astro/config'
import UnoCSS from 'unocss/astro'

export default defineConfig({
  integrations: [UnoCSS()],
})

Note: presetWind4 moved some theme keys — borderRadius becomes radius, breakpoints becomes breakpoint, and fontFamily becomes font. Check the presetWind4 docs before you port an existing theme.

Design tokens stay as CSS variables, and utilities reference them — so theme switches stay a one‑line change:

:root {
  --primary: oklch(0.7 0.2 250);
}

Conclusion

UnoCSS and Tailwind are close cousins. Tailwind gives you a huge, documented, batteries‑included framework; UnoCSS gives you a small, fast engine that speaks the same language and ships only what you use. We picked UnoCSS because it fits how we build — and because it keeps our output lean. If your team is already fluent in Tailwind, staying there is a perfectly good decision.

Lean CSS is part of how pages get fast — see why website speed matters for SEO. Read more engineering notes on our approach hub, or see how we build fast sites in our web development service.

Yuri Osipov

Yuri Osipov

Founder, SEO & analytics

Runs Take the Space. Specialises in technical SEO, measurable analytics setups and AI search visibility.

All posts by the author →
Does UnoCSS support Tailwind classes?
Yes. presetWind4 (and presetWind3) implement Tailwind‑compatible utilities, including opacity modifiers and gradients. Most of your class strings keep working unchanged.
Is UnoCSS production‑ready?
Yes. It is used in production across many large projects and has a stable, versioned engine. If you need the broader plugin catalogue, Tailwind remains the more conventional choice.
Can I migrate from Tailwind gradually?
Yes. Start with presetWind4, drop the Tailwind Vite plugin, convert the @theme tokens into the UnoCSS theme, and replace a few Tailwind‑only utilities as you find them. Do it in one focused commit so a regression is easy to spot.
Does UnoCSS work with Astro islands and React?
Yes. The Astro integration scans .astro, .tsx and Markdown files, so classes used inside React islands are generated too.

Want a high‑performance website?

Let’s discuss how we can help your business grow.