Panda CSS 2.0 replaces its TypeScript-based compiler with an engine written in Rust on top of Oxc: you keep the same css() API, but migration is manual. Version 2.0.0 came out on September 29, 2026 and today npm serves 2.1.2. There’s no codemod, and you need Node 22 and an ESM project before you start.
What is Panda CSS and what does it have to do with Chakra UI?
Panda CSS is a zero-runtime, strictly-typed CSS-in-JS framework designed for building design systems. It’s developed by the Chakra UI team, led by Segun Adebayo; the repository lives at chakra-ui/panda, has 6.2k stars on GitHub, and uses the MIT license. You write styles as typed objects with css(), recipes, patterns, and style props in JSX. At build time, Panda extracts them and generates atomic CSS, so the browser receives a normal stylesheet and no style runtime.
Tokens, conditions, and recipes live in panda.config.ts, and from that configuration Panda generates a styled-system folder with typed helpers. If you’re coming from Chakra UI, the official documentation includes a migration guide specific to it, along with guides from Tailwind CSS, StyleX, Emotion, Styled Components, and vanilla-extract.
What changes in Panda CSS 2.0?
The engine changes; the way you write styles doesn’t.
In v1, extraction went through ts-morph, a wrapper around the full TypeScript compiler, and a JavaScript interpreter evaluated constant values. In v2, Oxc parses each file just once, and that single parse is shared across imports, css() calls, JSX, and identifier resolution. Files that never import Panda, including most of node_modules, are skipped entirely. CSS is emitted natively in Rust instead of passing through PostCSS.
The engine is distributed in two ways:
| Binding | Package | Where it runs |
|---|---|---|
| Native (NAPI) | @pandacss/compiler |
CLI, Vite, PostCSS |
| WebAssembly | @pandacss/compiler-wasm (~490 KB gzip) |
Browser, playground |
Both wrap the same Rust crates, so a build in Node and one in the browser produce exactly the same CSS.
How much faster is Panda CSS 2.0?
These figures are benchmarks from the Chakra team itself, measured on their fixtures, which go up to a synthetic project of a thousand files:
| Measurement | v1 | v2 |
|---|---|---|
| Cold extraction | — | 15–37× faster |
| Cold parse, 100 files | 187 ms | 7.5 ms |
| Re-parse in watch mode, per file | ~650 µs | less than 2 µs |
| Parse pass, Next.js project | 762 ms | 31 ms |
staticCss, config of ~29,000 rules |
25.7 s | ~0.3 s |
| Generated type instantiations | ~2,600 | ~20 |
The team also reports between 21 and 25 percent less memory in tsc, between 40 and 60 percent less type-check time, and css() and recipes with memoization, up to 4 times faster for styles resolved at runtime.
What does the new engine solve that v1 couldn’t?
v2 follows imports. In v1, a style value imported from another file didn’t produce CSS. v2 reads named imports, re-exports, barrels with export *, and tsconfig path aliases, and generates the rule. It also resolves object members at build time, arithmetic in template literals, and both branches of a ternary. If you added entries to staticCss only because v1 didn’t see an import, you can remove them now.
There are two import forms that still aren’t followed: default imports and namespace imports (import * as theme). Use named imports.
How to migrate to Panda CSS 2.0?
Your panda.config.ts stays put, and the panda and pandacss binaries keep their names. The rest is a list of changes best done in this order. Details follow the official “Upgrading to v2” guide as it was on October 8, 2026.
1. Move to Node 22 and ESM
v2 is ESM-only and has no CommonJS build. Define "type": "module" in package.json (or use .mjs) and convert any require():
// Before
const { defineConfig } = require('@pandacss/dev')
// After
import { defineConfig } from '@pandacss/dev'
Leave postcss.config.cjs as is: it stays in CommonJS on purpose, because Next.js still expects that file in CJS.
2. Update all @pandacss/* packages together
npm install @pandacss/dev@latest
All @pandacss/* packages are published with a single version: don’t mix v1 packages with v2. Also update integrations you use to the same version: @pandacss/postcss, @pandacss/vite, @pandacss/webpack, @pandacss/rollup, or @pandacss/bun.
3. Do a clean build
panda build --clean # codegen + cssgen in one pass
panda codegen --clean # or, if you only run codegen
You only need --clean once, but don’t skip it. v2 doesn’t delete files it no longer generates, and v1 wrote .mjs where v2 writes .js. Vite resolves index.mjs before index.js, so a leftover file from v1 can beat the new one without you noticing.
4. Run panda doctor
panda doctor replaces inspect, validate, and info with a single project health check. Add --json if you’re going to use it in scripts. It’s the closest thing v2 has to an automatic migration tool.
5. Fix the configuration, starting with silent changes
Two of these changes produce no error:
-
Presets no longer add themselves. v1 injected
@pandacss/preset-baseautomatically; v2 doesn’t. If your config lists only your own presets, you lose base utilities and conditions. The build still works, withunknown_conditionwarnings. If you’re missing components likeFlex, it’s because of this.export default defineConfig({ presets: ['@pandacss/preset-base', '@acme/preset'] }) -
theme.containerSizesis nowtheme.containers. The old key is ignored with no warning, and all container conditions@name/sizestop working.
The rest of the changes:
- Hooks moved to
plugins. Each hook now lives in a plugin with a name, with afilterand ahandler.cssgen:donebecame read-only: you can read the CSS, but not rewrite it. If you used it to remove unused tokens or keyframes, switch tooptimize.removeUnusedTokensandoptimize.removeUnusedKeyframes. createStyleContextsplit into two:createSlotRecipeContextfor slot recipes (sva) andcreateRecipeContextfor config recipes (cva).- Template literal syntax removed. Delete the
syntaxoption and rewritecss`color: red;`ascss({ color: 'red' }). definePartsno longer exists. Write the[data-part="…"]selector yourself or usedefineSlotRecipe.- Nine configuration options removed:
studio,eject,emitTokensOnly,gitignore,clean,watch,poll,lightningcss, andbrowserslist. - Type imports changed.
@pandacss/devnow exports onlyConfig,Preset, andUserConfig; the rest comes from@pandacss/types. - You no longer need
@pandacss/plugin-vueor@pandacss/plugin-svelte. The compiler reads.vue,.svelte, and.astrofiles directly.
Does Panda CSS 2.0 break your CI?
It can, but because of your package.json scripts, not your styles. Review scripts with the same care as config:
| v1 | v2 |
|---|---|
panda codegen --silent |
panda codegen --log-level silent |
panda cssgen "src/**/*.tsx" |
panda cssgen --include "src/**/*.tsx" |
--cpu-prof |
--profile (writes trace.json and timings.json, not .cpuprofile) |
panda inspect / validate / info |
panda doctor |
panda mcp |
npx -y @pandacss/mcp |
panda ship |
panda lib |
--poll |
removed |
The change to positional globs is the most dangerous. In cssgen, analyze, and debug, a leftover glob doesn’t fail: Panda just ignores it and scans the include list from your config. The build finishes fine, but scans different files than you expected.
Besides scripts, your CI image needs Node 22 or higher.
What changes in the generated CSS?
CSS stays the same as v1, except for a short list of deliberate changes. Know them before comparing output:
- Breakpoints use range syntax,
@media (width >= 48rem), instead ofmin-width. - Border overrides sort by property, not by code order. A
borderWidththat applies to all sides now always beats aborderInlineEndon a single side. When an override has to win, use the long property:borderInlineEndWidth: '0'. - Universal variable reset goes away. The 34 variables v1 put on every element now register with
@propertyand only emit when used. This requires Chrome 85+, Safari 16.4+, or Firefox 128+. Turn onoptimize.propertyFallback: trueif you support older browsers. sizes.proseis narrower in@pandacss/preset-panda: 60ch instead of 65ch.scrollbarWidthaccepts keywords (auto | thin | none), not size tokens.
If you migrate gradually, watch out for cascade layers. Panda emits its CSS inside @layer, and per the CSS spec any rule without a layer beats all layered rules. Your legacy styles will beat already-converted components, unless you strip the layer wrapper with postcss-cascade-layers or keep a clear boundary by route or directory.
What’s worth enabling after migrating?
-
The ESLint plugin. Validates with the same extraction engine your build uses, and also runs under oxlint:
// eslint.config.jsimport panda from '@pandacss/eslint-plugin'export default [panda.configs.recommended]It includes rules like
no-invalid-token-paths,prefer-token,no-shorthand-longhand-mix,no-deprecated, and aconsistent-property-stylewith autofix. -
viewTransition()lets you style the View Transitions API from your styled system. -
firstThatWorks()emits a modern value with its fallback, for examplefirstThatWorks('100dvh', '100vh'). -
keyframes()andpositionTry()define animations and anchor positioning fallbacks next to the component that uses them, with tree-shaking based on what the build actually references. -
panda libanddesignSystemlet you publish a design system as an npm package and consume it without re-extracting in the app. -
transform: truein Vite, webpack, Rollup, or Bun plugins rewrites staticcss()calls as class strings, so the style runtime vanishes from the bundle.
Panda CSS or Tailwind?
Both generate atomic CSS at build time; the difference is where you write styles. Tailwind uses utility classes in markup. Panda uses style objects and typed props validated against your tokens, and with v2 the ESLint plugin enforces those tokens at lint time too. If you want to evaluate the switch, Panda’s docs include a migration guide from Tailwind CSS.
How about you? What change in v2 worries you most about migrating your project?
- Tailwind CSS
- Panda CSS
- Runtime CSS-in-JS (Emotion, Styled Components)
- I prefer another option (tell us which)
Comment below or, if this article reached you by email, reply directly to the email: your answer publishes here.
Related: Feature Friday: Vite 6.0 - The Build Tools Revolution That Redefines Speed