unocss

An instant, on-demand atomic CSS engine with zero core utilities and fully pluggable presets.

Library
npm
v66.10.0
18,947stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
91/100Excellent
Development Activity100
Maintenance100
Community68
Maturity56
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
85/100Excellent
Architecture90
Code Quality90
Innovation85
Learning Curve75

UnoCSS is an atomic CSS engine built with no built-in utility set at all — every utility class it understands comes from a preset you choose to load, so the engine itself stays a tiny, general-purpose matching and generation core. It was designed for speed: rather than parsing your source into an AST and scanning for known class names, it matches tokens directly against rules, which the project positions as several times faster than Windi CSS or Tailwind’s JIT engine while shipping at roughly 6kb min+brotli with zero runtime dependencies.

On top of that engine, the umbrella unocss package bundles the official Wind (Tailwind/Windi-compatible) presets, attributify mode for grouping utilities into HTML attributes, pure-CSS icon utilities backed by Iconify, shortcuts for aliasing repeated utility combinations, and transformers for @apply-style CSS directives and variant-group shorthand. It ships first-class integrations for Vite, Webpack, PostCSS, Rollup, Nuxt, and Astro, plus a CLI, a browser-runtime build for CDN usage, a VS Code extension, and an interactive inspector for debugging generated output.

The project is maintained by Anthony Fu (Vue core team, VoidZero) and is one of the most widely adopted CSS tooling projects in the Vite/Vue/Nuxt ecosystem, with active development, frequent releases, and a large surrounding preset and integration ecosystem.

What You Get

  • A dependency-free core engine (@unocss/core) that resolves rules, variants, shortcuts, and extractors with no assumptions about what utilities exist
  • Official Wind presets (preset-wind3/preset-wind4) that reimplement Tailwind/Windi-compatible utility syntax on top of the engine
  • Attributify mode, pure-CSS Iconify-backed icons, web fonts, typography, and legacy-compat presets, all installable independently
  • Transformers for @apply CSS directives, variant-group shorthand, class compilation, and JSX attributify syntax
  • First-class plugins for Vite, Webpack, Rollup, PostCSS, Nuxt, and Astro, plus a standalone CLI and a CDN runtime build
  • An interactive inspector, a VS Code extension, and an ESLint plugin/config for authoring and validating utility strings

Common Use Cases

  • Replacing Tailwind CSS in a Vite, Nuxt, or Astro project for faster on-demand generation without a build-time content scan
  • Building a fully custom design system where the project defines its own rules and presets instead of adopting a fixed utility set
  • Using attributify mode to group long utility class lists into readable HTML attributes
  • Serving atomic CSS to a runtime environment (e.g. a CDN-loaded page or an MPA) via the CSS-in-JS runtime build
  • Standardizing icon usage across a codebase by referencing any Iconify icon as a single utility class

Under The Hood

Architecture The engine lives in @unocss/core (packages-engine/core), centered on generator.ts’s UnoGenerator/TokenProcessor, which resolves user config (config.ts) into rules, shortcuts, variants, and extractors, then matches raw tokens against them directly rather than building an AST or scanning source with regex-per-file passes — tokens are parsed in batches (a documented, benchmark-tuned batch size) with per-token caching and a blocked-token set to avoid re-matching known misses. Presets, transformers, and framework integrations (packages-presets/*, packages-integrations/*) are separate packages that only depend on the core’s public types, so the umbrella unocss package is just a composition layer that re-exports the Wind presets, icon/attributify/typography presets, transformers, and the Vite/Webpack/Astro/PostCSS/Rollup adapters. This plugin-style layering means the core has zero knowledge of any specific utility syntax — Tailwind/Windi compatibility is entirely a preset concern.

Tech Stack The codebase is TypeScript throughout, built with tsdown per-package and orchestrated across the monorepo with Turborepo and pnpm workspaces using pnpm catalogs to pin shared dependency versions (build, testing, eslint, vue, vite catalogs, etc.). Framework integrations wrap Vite, Webpack, Rollup, PostCSS, Nuxt, and Astro directly; the docs site is a VitePress app with a live interactive playground; the VS Code extension and language-server package ship as separate workspace members.

Code Quality The root test/ directory holds dozens of Vitest suites (one per preset/transformer/integration — preset-wind4.test.ts, transformer-directives.test.ts, rollup-assets.test.ts, webpack-assets.test.ts, etc.) plus snapshot fixtures under test/__snapshots__, and test:ci chains build, tsgo typechecking, ESLint (via @antfu/eslint-config), unit tests, and a Svelte integration-test pass. CI (ci.yml, autofix.yml, release.yml, benchmark.yml) runs on every push, and package exports are validated with publint/attw (Are the Types Wrong) to catch broken type or module resolution before release.

API Design The umbrella unocss package’s exports map gives each integration its own subpath (unocss/vite, unocss/astro, unocss/webpack, unocss/preset-wind4, etc.) so consumers import only what they use without pulling in unrelated adapters, and the same preset/rule/variant primitives are reused identically whether the caller is on Vite, Webpack, or the CLI. The tradeoff is a wide public surface — dozens of presets and transformers with their own option shapes — that requires reading preset-specific docs to configure well, though the interactive docs/playground and VS Code extension mitigate the discovery cost.

Used by 11 apps in this directory

TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,622

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
87
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated 5 days ago
Go
92%
AGPL 3.0

BillionMail

Marketing

15,533

Self-hosted email server and marketing platform that gives you unlimited sending, full deliverability control, and AI-assisted campaigns without monthly fees.

View details
57
Repo Health
74
Technical
70
Dependency
Built with
Go92%
Updated 2 months ago
Go
92%
AGPL 3.0

BillionMail

Marketing

15,533

Self-hosted email server and marketing platform that gives you unlimited sending, full deliverability control, and AI-assisted campaigns without monthly fees.

View details
57
Repo Health
74
Technical
70
Dependency
Built with
Go92%
Updated 2 months ago
TypeScript
95%
Apache 2.0

Enclosed

Security

2,072

Send end-to-end encrypted notes and files where the server never sees your content — true zero-knowledge sharing.

View details
57
Repo Health
88
Technical
71
Dependency
Built with
TypeScript95%
Updated 4 days ago
TypeScript
95%
Apache 2.0

Enclosed

Security

2,072

Send end-to-end encrypted notes and files where the server never sees your content — true zero-knowledge sharing.

View details
57
Repo Health
88
Technical
71
Dependency
Built with
TypeScript95%
Updated 4 days ago
Vue
50%
GPL 3.0

IT-Tools

Developer Tools

40,498

A unified collection of 88 web-based developer utilities — from JSON formatting to subnet calculation — all self-hostable, keyboard-searchable, and offline-ready.

View details
60
Repo Health
74
Technical
63
Dependency
Built with
Vue50%
TypeScript48%
Updated 4 days ago
TypeScript
97%
MIT

NewsNow

Bookmarks Archiving

21,642

Self-hostable news aggregator with an elegant column layout, GitHub OAuth, adaptive scraping intervals, and seamless Cloudflare D1 or SQLite persistence.

View details
66
Repo Health
74
Technical
72
Dependency
Built with
TypeScript97%
Updated 2 months ago
TypeScript
97%
MIT

NewsNow

Bookmarks Archiving

21,642

Self-hostable news aggregator with an elegant column layout, GitHub OAuth, adaptive scraping intervals, and seamless Cloudflare D1 or SQLite persistence.

View details
66
Repo Health
74
Technical
72
Dependency
Built with
TypeScript97%
Updated 2 months ago
TypeScript
94%
AGPL 3.0

Papra

Bookmarks Archiving

5,296

Self-hosted document archiving with email ingestion, OCR full-text search, and pluggable storage — store once, find anything.

View details
86
Repo Health
82
Technical
69
Dependency
Built with
TypeScript94%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search