Use the automated CLI to set up Dreamy UI in your project:
pnpm dlx @dreamy-ui/cli initThe CLI will automatically:
- Detect your framework (React Router v7, Next.js, or Vite)
- Install all required dependencies (Panda CSS + Dreamy UI)
- Create and configure
panda.config.ts - Update
vite.config.tsorpostcss.config.mjswith Panda CSS PostCSS plugin - Remove default Tailwind CSS (React Router v7 and Next.js only)
- Set up CSS files with proper imports
- Create a
DreamyProvidercomponent - Update your
tsconfig.jsonwith@/*path alias and styled-system (if using TypeScript) - Next.js also gets
styled-system/*path alias for proper type resolution - Run Panda CSS codegen to generate the styled-system
- Add recommended components (button, flex, text, heading) to get you started
- Prints out code to add to the root of your application
Follow the Panda CSS installation guide to set up Panda CSS in your Vite project.
Install Dreamy UI in your project:
pnpm install @dreamy-ui/react @dreamy-ui/panda-preset motionConfigure environment and panda presets in your panda.config.ts file:
import createDreamyPreset, { dreamyPlugin } from "@dreamy-ui/panda-preset";
import { defineConfig } from "@pandacss/dev";
export default defineConfig({
...,
preflight: true,
jsxFramework: "react",
jsxStyleProps: "all",
outExtension: "js",
include: [
"./src/**/*.{js,jsx,ts,tsx}",
],
presets: [
createDreamyPreset()
],
plugins: [dreamyPlugin],
theme: {
extend: {}
},
globalCss: {
extend: {}
},
staticCss: {
extend: {}
}
});Add the following alias to your tsconfig.json file:
{
"include": [
...
"styled-system/*"
],
...
}After configuring Panda CSS, finally we can add the main Dreamy Provider to your app root:
...
import { DreamyProvider } from "@dreamy-ui/react";
import { domMax } from "motion/react";
ReactDOM.createRoot(document.getElementById("root")).render(
<DreamyProvider
motionFeatures={domMax}
motionStrict
useUserPreferenceColorMode
>
<App />
</DreamyProvider>
);Now you can start using Dreamy UI in your src/App.tsx.
import { Button } from "@dreamy-ui/react";
function App() {
return <Button>Dreamy UI!</Button>;
}
export default App;