Skip to content

feat(cli): add panda studio - #3663

Closed
Adebesin-Cell wants to merge 10 commits into
chakra-ui:v2from
Adebesin-Cell:feat/cli-studio-clean
Closed

feat(cli): add panda studio#3663
Adebesin-Cell wants to merge 10 commits into
chakra-ui:v2from
Adebesin-Cell:feat/cli-studio-clean

Conversation

@Adebesin-Cell

@Adebesin-Cell Adebesin-Cell commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

📝 Description

panda studio visualizes your design tokens. It replaces the removed v1 Astro studio with two lighter tracks that share one token snapshot:

  • panda studio — a live viewer built from plain HTML/CSS/JS (no framework, no bundler).
  • panda studio generate — emits the token views into your project as source, shadcn-style, so you render them wherever you document your design system.

Both read a generated tokens.json snapshot. Re-run to refresh after a config change. Design rationale lives in design-notes/cli-studio-generate.md.

⛳️ Current behavior (updates)

The v1 studio (@pandacss/studio, an Astro app) was removed in the Rust migration. There's no built-in way to look at your resolved tokens.

🚀 New behavior

panda studio boots a local viewer with a sidebar shell (category nav + scroll-spy + theme toggle), matching the old studio layout but kept light in vanilla HTML/CSS/JS. Each category is presented the way the old studio did:

  • colors grouped by family, shades in order
  • typography as real sample text at the actual size/weight/font
  • spacing and sizes as a scale table (name, value, pixel equivalent, proportional bar)
  • radii, borders, shadows, blurs, aspect-ratios as previews
  • animations run live and easings animate a dot with their timing function (keyframes are emitted from your config)

It follows your system light/dark theme, has a filter box whose query persists in the URL (?q=), and takes --port.

panda studio generate writes one component per category plus a shared grid into styled-system/studio (--outdir to change). Views match config.jsxFramework (React or Solid), reuse the same presentation, and don't import the styled-system runtime, so they render anywhere. You own the files and re-run to refresh.

💣 Is this a breaking change (Yes/No):

No.

📝 Additional Information

Notes:

  • Generated views are React or Solid. Other frameworks use the vanilla viewer; they can be added later the same way.
  • studio and studio generate are routed as leaf commands in cli-main rather than a citty subcommand group, so space-separated flags (panda studio --port 4000) parse correctly.
  • The contrast checker, typography playground, and semantic tokens all land as stacked PRs on top of this one (see the stack below) — CLI-only, no engine change.

Test plan:

  • pnpm --filter @pandacss/cli test — studio unit + command tests and help snapshots pass
  • panda studio generate in sandbox/storybook — generated React views typecheck under strict, and a *.stories.tsx importing them compiles against the sandbox tsconfig
  • panda studio against the sandbox — the viewer serves the snapshot and renders the sandbox tokens in light and dark; search filters and round-trips through ?q=; animations and easings run

🧬 Stack

@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d417c88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@pandacss/cli Minor
@pandacss/dev Minor
@pandacss/language-server Minor
@pandacss/typescript-plugin Minor
playground Patch
website Patch
@pandacss/compiler-shared Minor
@pandacss/compiler-wasm Minor
@pandacss/compiler Minor
@pandacss/config Minor
@pandacss/eslint-plugin Minor
@pandacss/mcp Minor
@pandacss/postcss Minor
@pandacss/preset-base Minor
@pandacss/preset-panda Minor
@pandacss/rollup Minor
@pandacss/transformer Minor
@pandacss/types Minor
@pandacss/vite Minor
@pandacss/webpack Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

@Adebesin-Cell is attempting to deploy a commit to the Chakra UI Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
panda-docs Error Error Jul 17, 2026 6:46pm

Request Review

@segunadebayo segunadebayo changed the title feat(cli): add panda studio token viewer feat(cli): add panda studio to v2 Jul 17, 2026
@Adebesin-Cell Adebesin-Cell changed the title feat(cli): add panda studio to v2 feat(cli): add panda studio Jul 17, 2026
@Adebesin-Cell
Adebesin-Cell force-pushed the feat/cli-studio-clean branch from ecced3e to 3a0c1ca Compare July 17, 2026 19:06
Add `panda studio` (a live vanilla token viewer) and `panda studio generate`
(emit token views as source for React/Solid). Both read a generated tokens.json
snapshot and present tokens the way the removed v1 Astro studio did — colors by
family, typography samples, spacing/sizes scale — kept light in HTML/CSS/JS.
Emit @Keyframes CSS from config so animation tokens run live in the viewer and
generated views, and animate an easing dot with each token as the timing function.
Give the live viewer a sidebar shell (category nav with scroll-spy, theme
toggle) matching the old studio layout, add a filter box, and persist the
filter query in the URL.
Track the active category from scroll position so short trailing sections
(e.g. breakpoints) highlight correctly at the bottom of the page.
@Adebesin-Cell

Copy link
Copy Markdown
Collaborator Author

Consolidated into #3666 — the full panda studio feature now ships as one PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant