# vanilla-extract

> Zero-runtime Stylesheets-in-TypeScript

Source: https://talira.ai/catalog/vanilla-extract-f6hkm8zf
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / css in js](https://talira.ai/categories/libraries/css-in-js)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source under MIT.
- Free tier: yes[^2]
- Self-hostable: yes[^1]
- Backed by: [SEEK](https://talira.ai/orgs/seek.md)

vanilla-extract lets you write styles in TypeScript `.css.ts` files (locally scoped class names, CSS variables, keyframes, font faces and themes) and turns them into static CSS files at build time, so none of the styling code reaches the browser bundle. Its README calls it CSS Modules in TypeScript with scoped CSS variables: styles are typed through CSSType, themes are type-safe token contracts you can apply several of at once, and `styleVariants` groups variants by name. Official bundler integrations cover [Vite](https://talira.ai/catalog/vite-2kbqmjmm.md), [esbuild](https://talira.ai/catalog/esbuild-198nyf0k.md), [webpack](https://talira.ai/catalog/webpack-9pcx44tb.md), Next.js, Parcel, Rollup and Gatsby, and companion libraries add Sprinkles (a zero-runtime atomic utility API), Recipes (multi-variant styles) and dynamic runtime theming. It's MIT-licensed and comes from SEEK.

## Links

- Website: https://vanilla-extract.style/
- GitHub: https://github.com/vanilla-extract-css/vanilla-extract
- Docs: https://vanilla-extract.style/documentation/getting-started/

## Problems it solves

- our CSS-in-JS library injects styles at runtime and slows down page rendering
- I want type errors when a component uses a theme variable that doesn't exist
- write scoped styles in TypeScript but ship plain static CSS files
- support several themes on one page at the same time without global CSS variables clashing
- use TypeScript as our CSS preprocessor instead of Sass or Less
- build our own atomic utility classes, like Tailwind, from our design tokens with zero runtime
- define button variants (size, colour, tone) once and look them up by name in components
- server components can't use runtime CSS-in-JS; we need styles extracted at build time
- locally scoped class names like CSS Modules but with typed variables and themes

## Features

- styles in .css.ts files compiled to static CSS at build time, with no runtime in the bundle
- locally scoped class names, CSS variables, @keyframes and @font-face
- type-safe styles via CSSType
- theme system with typed token contracts and simultaneous themes
- selectors, pseudo-classes, media, feature and container queries, and global styles
- styleVariants to group style variants by name
- calc utilities for variable-based expressions
- official integrations for Vite, esbuild, webpack, Next.js, Parcel, Rollup and Gatsby, plus a Jest transform
- Sprinkles: zero-runtime atomic CSS utilities generated from your tokens
- Recipes: multi-variant style APIs, and an optional API for dynamic runtime theming

## Limitations

- Doesn't work without a bundler: it needs a bundler integration set up to handle CSS[^1]

## Trust

Overall: 0.61 out of 1.
Signals: maintenance 0.72, adoption 0.80, momentum 0.66, community 0.86, backing 0.30, extensibility 0.00.

- last commit today
- 18 commits in the last 90 days
- latest release @vanilla-extract/integration@8.0.11 47 days ago
- 10.5k GitHub stars
- 143 contributors
- backed by SEEK

## Alternatives

- [StyleX](https://talira.ai/catalog/stylex-cqw1r35s.md): The expressive, type-safe, composable, predictable and themeable styling system for ambitious interfaces
- [styled-components](https://talira.ai/catalog/styled-components-97cxpqhn.md): Fast, expressive styling for React. Server components, client components, streaming SSR, React Native, all one API.
- [Panda CSS](https://talira.ai/catalog/panda-css-tqftwdj6.md): Universal, type-safe, CSS-in-JS framework for design systems
- [Emotion](https://talira.ai/catalog/emotion-cdf86k4g.md): CSS-in-JS library designed for high performance style composition
- [goober](https://talira.ai/catalog/goober-bq3mcays.md): A less than 1KB css-in-js solution

## Sources

[^1]: https://vanilla-extract.style/documentation/getting-started/ (checked 22 Nov 2026)
[^2]: https://github.com/vanilla-extract-css/vanilla-extract/blob/master/LICENSE (checked 22 Nov 2026)
