Introducing a new way to review your PRs.

Read the announcement

chakra-ui / panda

🐼 Universal, Type-Safe, CSS-in-JS Framework for Design Systems ⚡️

View on GitHub

19 documents · Updated Sep 23, 2026

docs / studio-tooling

Studio tooling

Studio tooling provides a local or deployable view of a Panda project’s design system. It reads the project configuration and presents its tokens, styles, themes, and visual checks so engineers can inspect design choices and try them in context without building a separate documentation site. It sits beside the framework integrations described in Framework integrations, while its package-level relationship is covered in Framework plugin packages.

Studio purpose

Design-system inspection

Panda Studio is a read-only documentation surface for the design system. It turns the project’s configured design values into browsable pages for colors, fonts, sizes, spacing, radii, text styles, and layer styles. This gives product and engineering teams one place to see the values that their Panda project makes available.

References: website/…/studio.mdx• L6-22 packages/…/constants.ts• L41-118

Interactive exploration

Studio also supports small authoring and review tasks through visual playgrounds. Engineers can try typography combinations and check color contrast in the browser, but these interactions help evaluate a design choice; they do not replace the Panda configuration or write changes back to it.

References: packages/…/constants.ts• L120-132 packages/…/typography-playground.tsx• L19-87 packages/…/contrast-checker.astro• L1-10

Studio runtime

CLI lifecycle

The studio CLI command is the main entry point for a Panda project. It loads the project configuration, then starts Studio for local use, creates static output for deployment, or serves an existing build for preview.

When the local server runs, Studio uses the project configuration as its source of truth. The build and preview modes separate generation from serving, so a deployed or reviewed Studio page represents the configuration used to create that output.

flowchart LR
  Config[Panda project configuration] --> CLI[studio CLI command]
  CLI --> Serve[Local Studio server]
  CLI --> Build[Static Studio build]
  Build --> Preview[Preview or deploy]
  Serve --> Inspect[Inspect tokens and styles]
  Preview --> Inspect

References: packages/…/cli-main.ts• L335-385 packages/…/studio.ts• L14-75

Astro integration

The @pandacss/astro-plugin-studio package connects Studio to Astro and Vite. It supplies the Panda data that the Studio pages consume, and it reloads that data when the watched Panda configuration changes during local development. The plugin also keeps the browser-side state libraries usable in Astro’s server-rendered build.

The @pandacss/studio package owns the Studio application and uses the Astro integration for each serve, build, and preview lifecycle. This separation lets the application focus on the inspection experience while the plugin connects that experience to a project’s Panda configuration.

References: packages/…/index.ts• L7-89 packages/…/studio.ts• L18-28 packages/…/studio.ts• L36-71

Configuration flow

The CLI passes the resolved Panda configuration path into the Studio runtime. The Astro plugin reads that path, loads the configuration, and exposes the resulting theme data to the Studio application. The application then builds its token pages and playgrounds from that shared data rather than from a second copy of the project’s design system.

This flow also supports live review. A changed configuration causes the local Studio data source to reload, so the next view reflects the updated design system without a separate documentation authoring step.

References: packages/…/cli-main.ts• L348-361 packages/…/studio.ts• L23-28 packages/…/index.ts• L16-35 packages/…/index.ts• L40-67

Inspection surface

Token and style catalog

The Studio catalog groups the project’s design data into token pages and style pages. Engineers can move from raw token values to higher-level text and layer styles while staying inside the same documentation surface. The navigation is organized as a token area and a playground area so reference work stays separate from visual checks.

References: packages/…/side-nav.astro• L8-30 packages/…/constants.ts• L41-118

Theme views

Projects that define named themes can inspect those themes from the Studio sidebar. Studio combines the selected theme with the base theme for the view, which lets an engineer review the values that a theme adds or changes without losing the shared design-system context. If a project has no named themes, Studio does not show a theme selector.

References: packages/…/panda-context.ts• L24-61 packages/…/panda-context.ts• L101-149 packages/…/theme-selector.tsx• L17-25

Visual review tools

The playground pages turn the catalog into simple review tools. The typography playground applies selected font tokens to editable sample text, while the contrast checker compares colors for accessibility review. These tools connect visual feedback to the same configured token set that powers the catalog.

References: packages/…/typography-playground.tsx• L10-17 packages/…/typography-playground.tsx• L42-83 packages/…/constants.ts• L120-132

Change checklist

When these files or sections are changed, remember to consider these:

  • When the Studio data shape changes in @pandacss/astro-plugin-studio, update the Studio consumers that read the shared virtual data source.
  • When a token or theme category changes in the Studio navigation, keep the page route, navigation entry, and data lookup aligned.
  • When the CLI changes configuration-path or output handling, verify local serve, static build, and preview modes still pass the same project configuration contract.
  • When Studio is served below a base path, keep the CLI base option and generated page links consistent.

Important failure modes

TriggerConsequenceGuard
@pandacss/studio is not installed in the project that runs panda studioThe CLI stops before it can start, build, or preview StudioInstall the Studio package in the project that owns the Panda configuration
The configuration path is missing or points to an unreadable Panda configStudio cannot load the design-system data used by its pagesResolve and pass the same config path to the CLI and Astro integration
A local config change is made outside the watched configuration pathThe running Studio view can keep showing old design dataRestart Studio or make the watcher cover the configuration entry point
A static build is served with a different base path from the one used at build timeNavigation links can point to the wrong locationsUse the same base path for build and preview or deployment

Key files

FileWhy to read it
packages/…/cli-main.tsShows how the studio command selects local serve, build, and preview behavior and resolves the project configuration.
packages/…/studio.tsShows how the Studio application is launched through Astro for each lifecycle mode.
packages/…/index.tsDefines the Astro and Vite bridge that loads Panda configuration data and refreshes it during development.
packages/…/panda-context.tsExplains the shared view of tokens, themes, text styles, and layer styles used by the Studio pages.
packages/…/constants.tsGives the high-level map of token catalog pages and interactive playgrounds.
website/…/studio.mdxStates the user-facing purpose of Studio as live, read-only design-system documentation.