m3e-canvas README

项目的 README,来自 github.com/lnkiai/m3e-canvas。合并为一个 markdown 文件:README.md。

M3E Canvas

Sketch Material 3 Expressive screens in the browser, link them, tap through them, and copy a prompt for your AI coding tool.

GitHub stars Sponsors MIT License
Material 3 Expressive Next.js 16 React 19

Trendshift: #1 repository of the day

English日本語中文한국어

Opening a project in M3E Canvas, sketching the Pantry recipe app, tapping through its screens, copying the prompt, Claude Code building it in a terminal, and the finished app running on a phone; then an agent asked over MCP designs an app, which opens as a new project

Sketch the screens, tap through the flow, copy the prompt, and let your AI coding tool build the app. Or ask your agent to design it, over MCP. (mp4)

M3E Canvas is a free, open-source sketchpad for app screens made of real Material 3 Expressive parts. It runs entirely in your browser: no account, no server, nothing to install. What you sketch becomes a precise prompt that any AI coding tool that takes one, such as Claude Code, Codex, Gemini CLI or Cursor, can turn into a working app.

Open the app

How it works

The three steps: building a screen from the parts panel, tapping through it in the preview, and copying the prompt
  1. Sketch — Drag parts onto phone or desktop screens. They snap together and line up on a 4dp grid.
  2. Tap through — Link parts to screens and press Preview to try the flow, transitions included.
  3. Copy the prompt — The whole design becomes a short brief in your language. Paste it into your AI coding tool.

Or let your agent do it: with the MCP server connected, ask for the screens and get a link that opens them here. Hand the link back, and the agent builds the app.

What's inside

Six features: a part's own panel, linked screens, the Theme tab, the projects page, the Ask an AI dialog and the MCP guide

Real M3 Expressive parts — Buttons, FABs, bars, tabs, cards, lists, sheets, pickers, carousels, loading indicators and more, each with its own panel for text, style, size and what a tap does.

Screens and flow — Phone and desktop screens, screens that scroll, taps and swipes that open other screens with the transition you pick, and arrows that show the whole flow.

Theme in one place — Color, shape, type and motion: seven palettes or your own seed color, light and dark, three contrast levels, corner styles, fonts and the expressive spring motion.

Projects — Keep every design as a project in your browser. One page lists them with their screens: search, rename, duplicate, export them all to one file, or open one from a file or a link.

Optional AI help — Bring your own key to draft a design or write notes for you, or copy an instruction for a coding agent that replies with a share link. Keys never leave your browser.

MCP integration — Connect the m3e-canvas MCP server and your agent designs the screens for you, then builds the app from the screens you finished: npx -y m3e-canvas@latest setup

Everything it can do
  • Parts – buttons, icon buttons, FABs and extended FABs, FAB menus, split buttons, chips, top app bars, navigation bars and rails, floating toolbars, tabs, search bars, cards, list items, boxes, bottom sheets, dialogs, snackbars, text fields, dropdowns, switches, checkboxes, radio buttons, sliders, date and time pickers, text, images, carousels, camera and map placeholders, dividers, the shape-morphing loading indicator and wavy progress indicators. Every part has a panel for its text, style, size and alignment, and a trigger tab for what a tap does.
  • Magnetic connections – bring buttons, chips or list items close and they fuse into a connected group; the corners soften where they meet.
  • Phone and desktop screens – add as many screens as you like. Switch any screen between a 412×892 phone and a 1280×800 desktop from its label: bars stretch, a navigation bar becomes a rail and back again, and the parts are laid out again. Same-named screens are written into the prompt as one screen at two widths.
  • Screens that scroll – make a screen longer than its device and its body scrolls under the bars in the preview. Drag the grip on the bottom bezel, or pick 1x to 3x in the screen panel.
  • Tap and swipe to navigate – give any tappable part, app bar icon or navigation destination a target screen (or "back") and a transition: slide from any side, fade, expand or none. Screens can also open others on a swipe. The preview plays it all, and back runs in reverse.
  • Layers and groups – a layers panel per screen to change the stacking order; group parts to keep their overlap and move them as one, then copy and paste whole selections across screens.
  • Theme – seven palettes or one seed color that becomes a full Material 3 scheme you can fine-tune, light and dark, three contrast levels and dynamic color. Square, rounded or full corners for every part at once. Roboto, Roboto Flex, Roboto Serif or the system font. The standard or the expressive spring motion, which also drives the preview.
  • Prompt – the whole design or a single screen as a concise brief in Japanese, English, Chinese or Korean, with your notes on what each part does. Rows, overlaps and aligned grids of cards are spelled out, so the generated layout keeps them. Choose Android or the web as the target, edit the text before copying, or save a screen as a PNG.
  • Tidy – one button snaps bars to the edges and the FAB to the corner, joins neighbouring items, and stacks the rest on 16dp margins. Press it again to undo.
  • AI helper (optional) – bring your own key for OpenAI, Claude, Gemini or DeepSeek to draft a design from a sentence or write a part's behaviour note and a screen's description. Every rewrite can be undone. The request goes straight from your browser to the provider.
  • Share links – copy a link that opens your design on anyone's canvas, or an instruction for Claude Code, Codex or another agent: it reads agent.md, sketches what you described, and replies with such a link.
  • Projects – keep as many designs as you like. Each is a project in your browser, and a page lists them all: open, rename, duplicate, save as a file or delete one, and add one from a JSON file or a link. A link you open becomes a project of its own instead of replacing your canvas. Export all writes every project into one file, and opening that file brings the list back in any browser.
  • MCP – connect the m3e-canvas MCP server to Claude Code, Codex or another MCP client, and your agent designs the screens itself and hands back the link that opens them, or a JSON file for a very large design: npx -y m3e-canvas@latest setup. Give it the link of a design you finished, and it gets the prompt this app writes and builds the app from it. It runs on your machine and sends nothing anywhere.
  • Everything else – alignment guides and a 4dp grid, undo and redo, keyboard shortcuts, a keyboard-usable parts panel, favorites, install as an app, and autosave in your browser.
  • On a phone – one fixed screen and a buttons-only editor with bottom sheets. The full editor is for desktop browsers.

Keyboard

Key Action
V / H Select / hand tool (hold Space to pan)
Wheel, Ctrl + wheel Pan, zoom
+ - 0 Zoom in, zoom out, fit
Ctrl+Z / Ctrl+Shift+Z Undo / redo
Ctrl+C / Ctrl+V Copy / paste parts, also across screens
Ctrl+D Duplicate
Ctrl+G / Ctrl+Shift+G Group / ungroup
Shift + click Add to the selection
Arrows (Shift = 8dp) Nudge
Ctrl + drag Move without snapping (no guides, no 4dp grid)
Delete Delete part or screen
P Preview

Run it locally

npm install
npm run dev        # http://localhost:3000
npm run build      # static export to ./out

The app is a static Next.js export. To host it under a sub-path (for example a GitHub Pages project site), set NEXT_PUBLIC_BASE_PATH=/your-repo at build time. .github/workflows/deploy.yml does this and publishes out/ to GitHub Pages on every push to main.

Contributing

Bug reports, part requests and pull requests are welcome. CONTRIBUTING.md explains the setup, the conventions (English comments, four languages for every string) and where each kind of change lives. Questions go to Discussions.

Support

M3E Canvas is free and MIT-licensed, and stays that way. If it saves you time, you can sponsor the work on GitHub; it pays for the hours that go into new parts, the prompt, and reviewing contributions. No feature is behind sponsorship.

Sponsor on GitHub

Thanks to the sponsors who keep this going:

YspritanHyzygy

Thanks

Thanks to everyone who has contributed code, ideas and reviews:

CQMHV miaoledor Cokedog320 Grenish YspritanHyzygy andrewwbuilds rishabhiskawai aakash-kharb rahul05ranjan j-token solquin FlyGues2889 xiehuanyi Razshy

Credits

See also

Contact

For anything that does not fit an issue, such as collaboration or press, get in touch:

info@lnkiai.com@lnkiai on X

License

MIT © lnkiai

m3e-canvas (lnkiai/m3e-canvas)

正在搜索数据库…

这是什么?M3E Canvas 让你在浏览器里绘制 Material 3 Expressive 界面,可以把界面之间连接起来并点击切换,还能把整个设计转换成一段自然语言提示词,交给 AI 编程工具使用。
这是设计工具,还是会直接生成应用代码?它是一个基于浏览器的可视化草图工具,不是代码生成器:它输出一段简洁的文字提示词来描述你的设计,然后你把它交给 Claude Code、Codex、Gemini CLI 或 Cursor 等 AI 编程工具,由它们真正构建应用。
我该怎么开始使用?打开托管的网页应用,把组件拖到画布上即可开始;如果要在本地运行,克隆代码仓库并使用 Next.js 脚本(npm run dev / npm run build),因为该应用只是一个静态的 Next.js 导出产物。
使用它需要 API 密钥吗?不需要,核心画布和提示词输出都不需要任何密钥。只有可选的 AI 助手需要密钥,你需要自备 OpenAI、Claude、Gemini 或 DeepSeek 的密钥,用来自动撰写组件的行为说明或界面的描述。
它会帮我构建应用,还是只做设计?它只生成提示词和可点击的预览;你仍需要把提示词粘贴到 AI 编程工具中,并自己运行生成的应用。在手机上,你还只能使用简化的、仅含按钮的单屏编辑器,而不是完整的多屏桌面版工具。
我的设计和 AI 密钥会存到哪里?所有内容只保存在你浏览器的 localStorage 中;如果你使用可选的 AI 助手,你的密钥永远不会离开浏览器,请求会直接发送给服务提供方,中间没有任何服务器。
使用它免费吗?免费。它采用 MIT 许可证,将保持免费,且没有任何功能需要通过赞助才能使用。
什么是 Material 3 Expressive?它是 Google 最新的 Material Design 3 风格,带有更有弹性的形状、基于弹簧的动效和更丰富的主题配色。借助这个工具,你可以在编写任何代码之前先直观地制作原型。
我可以面向网页而不是 Android 吗?可以。生成提示词时,你可以选择 Android(默认)或网页作为目标平台,提示词会相应地要求使用对应的技术栈。
如何与他人分享设计?你可以复制一个分享链接,打开后会在任何人的画布上显示你的设计;也可以复制一段 AI 草稿指令,让编程代理读取 agent.md、绘制你描述的内容,并回复一个这样的链接。
把两个按钮拖得很近会怎样?它们会磁性地吸附融合成一个相连的组,交接处的边角会变得柔和;这种分组会明确写入生成的提示词中,以免丢失布局。
作者
lnkiai
大小
40.7 MB
星标
11K
时长
3个月
提交 · 90 天