We'll go through the step-by-step process of installing and initializing Panda CSS in a React project created with Vite.
pnpm create vite
pnpm add -D @pandacss/dev
to install Panda CSSpnpm panda init --postcss
to initialize the PostCSS plugin.postcss.config
file and a panda.config file
.In a global css file, add the cascade layer snippet required for Panda to work
In most cases, it's the
index.css
orglobal.css
file
@layer reset, base, tokens, recipes, utilities;
In your package.json file, add the following "prepare" script:
"prepare": "panda codegen --clean"
This ensures the "styled-system" folder exists in CI environments like GitHub Actions.