将组件拖动到画布上,并在 Next.js 项目中生成由 AI 提供支持的布局和样式变化。
An installable Design Playground for Next.js apps: a local-dev visual canvas
at /playground where you drop your app's real components and pages, preview
them against mock data, and iterate on them with a local coding agent (Cursor,
Claude Code, or Codex — spawned as CLI child processes, no API keys stored in
the app).
The playground is vendored into your repo: the installer copies an
app/playground/ (or src/app/playground/) folder, wraps next.config when
it can, and installs the playground's own dependencies nested inside that
folder — your lockfile is never touched.
Extracted from the Humanolab playground so any Next.js App Router app can install the same canvas without Humanolab-specific screens, mocks, or data.
From the root of a Next.js app:
npx design-playground@latest init(From a clone instead: node /path/to/design-playground/bin/design-playground.mjs init.)
Then start your dev server and open http://localhost:3000/playground.
Other commands:
npx design-playground init --dir src/app/playground # force src/ layout
npx design-playground@latest update # refresh unmodified framework files
npx design-playground update --dry-runVite apps: use design-playground-vite.
app/ or src/app/)react-dom 19cursor, claude, or codexsetup.mjs checks the installed versions in your host node_modules. React 18
or Tailwind v3 will refuse to continue.
Not supported: output: 'export' / output: 'standalone' (the playground needs
Next route handlers). basePath is supported.
template/ → /app/playground/ (or src/app/playground/).next.config with withPlayground() when the file is a common shape
(export default nextConfig / module.exports = nextConfig). Unusual configs
are left alone; add the wrap yourself from app/playground/next-plugin.cjs..gitignore.setup.mjs) so nothing lands in your
host package.json.To uninstall, delete app/playground/ (or src/app/playground/). There is
nothing to remove from the host lockfile.
The copy is a blank playground: built-in welcome cards, empty discovery registry, no host-app screens. Open Discover to scan this project.
Everything runs locally. Your code stays on your machine.
| Path | Purpose |
|---|---|
bin/design-playground.mjs |
Zero-dependency installer CLI (init, update) |
installer/ |
Host detection, copy/manifest, next.config patch |
template/ |
The playground itself — copied into hosts |
docs/ |
Install notes |
The vendored copy's own docs live at app/playground/README.md after install.
Dual regime — see LICENSE.md:
bin/, installer/, docs/: MIT.template/ (the playground itself, including the copy vendored into your
repo): PolyForm Shield 1.0.0 — free to use in your own products; don't
ship a competing playground product with it.暂无开放 Issues,或尚未同步最近议题。