Product experiences and validation
Panda has two main runnable product surfaces. The playground lets a person edit Panda code and see the result at once. The sandbox matrix places Panda inside real application frameworks so maintainers can check that the same styling workflow works across different hosts.
Experience model
The playground is the interactive demonstration surface. The sandboxes are repeatable validation surfaces. Together they connect a fast visual check with broader checks across framework build and run systems.
flowchart LR
A[Edit Panda code or config] --> B[Playground]
B --> C[Live preview and generated artifacts]
A --> D[Framework sandbox]
D --> E[Framework build and running app]
C --> F[Human feedback]
E --> G[Cross-framework validation]
Interactive playground
The interactive playground is a browser-based workbench for trying Panda without first creating a local application. It combines editable source and config with a live preview, so a user can move from a styling idea to visible output in one session. See the playground application page for its application-level flow.
The playground also exposes the intermediate result of that work. Users can inspect generated CSS and the parsed style view, switch between examples, test responsive sizes, and save a state as a shareable link. These features make the surface useful for both product discovery and quick checks of Panda behavior.
References: playground/…/PlaygroundContent.tsx• L44-50 playground/…/PlaygroundContent.tsx• L117-143 playground/…/ArtifactsPanel.tsx• L16-24
Framework sandbox matrix
The framework sandbox matrix is a set of small applications that run Panda through different application hosts. Each sandbox keeps the host framework visible while exercising the normal Panda setup for that host. The goal is to find integration gaps in development, generation, and production build flows.
The matrix covers several kinds of host:
| Host group | Representative environments | Validation focus |
|---|---|---|
| Component and app frameworks | Vite, Next.js, Remix, Gatsby, Waku | Client apps and server-aware app builds |
| UI frameworks | Svelte, Vue through Nuxt, Solid, Preact, Qwik | Framework-specific source and styling use |
| Content and component tools | Astro, Docusaurus, Storybook | Content sites and component documentation |
| Focused checks | Codegen and runtime performance | Generated output and runtime cost |
The matrix is part of the workspace, so these applications use the local Panda packages rather than only a published release. The framework sandbox matrix page gives the framework-specific entry points and checks.
References: pnpm-workspace.yaml• L1-6 sandbox/…/package.json• L5-16 sandbox/…/package.json• L5-10 sandbox/…/package.json• L5-16 sandbox/…/package.json• L7-14 sandbox/…/package.json• L7-14
Validation lifecycle
The two surfaces use the same broad path from Panda input to application behavior. The playground shortens the path for interactive feedback. A sandbox runs the path through the rules and build steps of its host framework.
When an engineer checks a change, the useful order is:
- Use the playground to confirm the user-facing styling behavior and inspect the produced artifacts.
- Run the affected sandbox in development mode to check live integration with its host.
- Build the affected sandbox to check the generated result in the host's production path.
- Run more than one framework sandbox when the change touches shared generation or framework-facing behavior.
This split keeps visual exploration fast while giving integration changes a wider check than one application can provide.
References: package.json• L7-20 playground/package.json• L5-20 sandbox/…/package.json• L5-16 sandbox/…/package.json• L5-10
Shared workspace role
The root workspace makes the playground and all sandbox applications peers of the Panda packages. Root commands can build the playground or operate on the sandbox and package groups, while each runnable surface keeps its own development and build commands.
This arrangement supports two useful forms of work:
- Product exploration: run the playground as a complete application with saved examples and shareable states.
- Integration validation: choose the sandbox that matches the framework or concern changed by the work.
The result is a clear boundary between a polished interactive experience and small, focused environments that expose host-specific problems.
References: pnpm-workspace.yaml• L1-6 package.json• L7-15 package.json• L19-34 playground/package.json• L5-20
Change checklist
When these files or sections are changed, remember to consider these:
- Changes to playground state fields must stay aligned across the editor state, the share request, the stored session, and routes that load shared or diff states.
- Changes to generated Panda APIs or output shape should be checked in the playground artifact view and in at least one sandbox from each affected host group.
- New or removed sandbox applications must stay aligned with the workspace package scope and the framework matrix page.
- Changes to a sandbox's Panda config must keep its source include paths and its host build or watch entry point aligned.
- Changes to root build filters must still reach both the runnable playground and the intended sandbox packages.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A playground config import or preset cannot be loaded | Config compilation fails and the preview cannot reflect the edited state | Use imports that the playground can resolve and treat its visible config error as a failed check |
| A playground share request fails validation or the session store is unavailable | The user cannot save a stable link to the current code, config, and CSS | Check the share path with the same state shape used by the editor and confirm the session store is available |
| A sandbox starts without fresh generated Panda output | The app can show stale styles or fail before the host app starts | Run the sandbox's prepare or code generation step before checking the host behavior |
| A change is checked in only one framework host | A shared Panda change can appear correct while another host path is broken | Build and run the affected sandbox groups, not only the fastest local example |
Key files
| File | Why to read it |
|---|---|
| pnpm-workspace.yaml | Defines the workspace boundary that includes the playground and sandbox applications. |
| package.json | Shows the root commands for playground builds, sandbox-related work, and repository-wide checks. |
| playground/package.json | Describes the playground's development, build, code generation, and database commands. |
| playground/…/page.tsx | Shows how the playground page selects an example or shared initial state. |
| playground/…/PlaygroundContent.tsx | Shows the product-level relationship between editing, artifacts, preview, examples, sharing, and responsive viewing. |
| playground/…/usePlayground.ts | Defines the user session model for examples, edits, layout, responsive mode, and share links. |
| playground/…/share.ts | Defines the boundary that saves a playground state for later sharing. |
| playground/…/schema.prisma | Defines the stored session data needed by shared playground links. |
| sandbox/…/package.json | Represents a Vite application with Panda generation, development, build, and bundle checks. |
| sandbox/…/package.json | Represents a Next.js application path in the matrix. |
| sandbox/…/package.json | Represents a non-React framework path with generation, watch, check, and build flows. |