Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

design-playground

> 编程语言
Open source

Drag components onto a canvas and generate AI-powered layout and style variations — right inside your Next.js project.

191 stars0 likes3 views
WebsiteGitHub

About

Drag components onto a canvas and generate AI-powered layout and style variations — right inside your Next.js project.

Design Playground

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.

Install

From the root of a Next.js app:

bash
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:

bash
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-run

Vite apps: use design-playground-vite.

Requirements

  • Next.js 15+ with App Router (app/ or src/app/)
  • React 19 and react-dom 19
  • Tailwind CSS v4
  • Node.js 20+
  • At least one agent CLI on your PATH for AI features: cursor, claude, or codex

setup.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.

What gets installed

  1. Copies template/ → /app/playground/ (or src/app/playground/).
  2. Wraps 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.
  3. Appends playground artifact entries to .gitignore.
  4. Runs the nested dependency install (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.

How it works

  1. Discover your project's existing React components
  2. Drag them onto an infinite canvas
  3. Iterate — the agent generates layout and style variations
  4. Compare variations side by side
  5. Use the code you like back in your project

Everything runs locally. Your code stays on your machine.

Repo layout

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.

License

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· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言