Set up Dreamy UI in your Next.js project.
Follow the Panda CSS installation guide to set up Panda CSS in your Next.js project.
Install Dreamy UI in your project:
Configure environment and panda presets in your panda.config.ts
file:
After configuring Panda CSS, finally we can add the main Dreamy Provider to your app/layout.tsx
.
First create a providers.tsx
file in app/providers.tsx
. This is where you will add all the providers you need for your app.
Next, add the Providers
component to your app/layout.tsx
file:
This way we pass the color mode to the Providers
component so initial document request will have the user color mode.
Let's write some Dreamy UI in app/page.tsx
.