← Back to library

Turn a Figma frame into a working web page

While rebuilding his studio homepage, Phil Sayer found static mockups gave an app builder little to work with. He connected Figma's MCP server to Cursor, picked the frame in Dev Mode and asked for HTML and CSS using its link. That one prompt matched colors, layout and even button hovers; the Rotis font did not transfer.

  • OutcomeGet a first coded version of a designed page that keeps colors, layout and hover states, so you start from a near-match.
  • SetupUnder an hour
  • LevelStarter
  • CreditPhil Sayer
View original
Works with
Custom agent

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

When should you use it?

  • You design in Figma and want a quick coded version
  • Screenshots fed to AI tools gave weak results
  • You can open a project folder in an AI editor

Not for: Production builds without developer review; Designs relying on paid fonts you have not licensed for the web

What do you need, and what do you get?

You need

  • A Figma file with Dev Mode access
  • An AI code editor with the Figma bridge enabled
  • A local repository

You get

  • HTML and CSS for the selected frame
  • A list of gaps, such as fonts, to fix

How does it work, step by step?

  1. Set up a repoCreate a local folder under version control and open it in the editor.
  2. Connect the design bridgeEnable Figma's MCP connection in the editor.
  3. Select and linkIn Dev Mode, select the frame and copy its link.
  4. Prompt simplyAsk for semantic HTML and CSS matching the frame.
  5. Compare and tweakCheck fonts, spacing and states against the design and iterate.

The prompt

Our own prompt, inspired by Phil Sayer and written to work in Custom agent. Values in lime are placeholders.

Prompt0 variables
Here is a Figma frame link: [link]. Using the design data, build this section as semantic, accessible HTML with a separate CSS file. Match colors, spacing, layout and hover states exactly. Use CSS variables for colors and sizes. If a font is not available as a web font, use the closest fallback and tell me which. List any part of the design you could not reproduce.

Inspired by Phil Sayer: Getting remarkable results quickly with Figma MCP and Cursor. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Custom fonts may not transfer; choose a licensed web font or self-host it.
  • Generated markup can be div-heavy; ask for accessible, semantic structure.

Our take

Phil Sayer's comparison makes a simple point clearly: an AI given a picture guesses, while an AI given the design's actual properties can build from them. Pulling colors, spacing and component states straight from Figma is why one prompt captured even hover effects that a screenshot never shows. For designers, that lowers the cost of seeing a layout live in the browser, which is where problems with responsive behavior and real content appear. The missing font is a reminder that design files reference assets the code environment may not have. Licensed typefaces like Rotis need web licenses and font files before they will render, so plan for that rather than accepting a fallback. Ask from the first prompt for semantic, accessible markup, real headings, buttons and labels, and for responsive breakpoints, because retrofitting those later costs more than generating them correctly. Compare the result side by side with the frame at several widths, and tidy the design file's layer naming first, since clear names produce clearer class names and code.

Where the time goes back: The first build of a page goes from hours to one prompt, leaving only refinements.

FAQ

Why not screenshots?
Structured design data shows how things are built, so the AI makes fewer assumptions than with an image.
What did it miss?
Typography: the specific typeface did not come through, which he puts down to it not being freely available online.

Source and credit

Inspired by Phil Sayer. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
Getting remarkable results quickly with Figma MCP and Cursor
Creator
Phil Sayer
Published on
designphilosophy.substack.com (Substack)
Original date
Aug 5, 2025
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Custom agent
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in Marketing

All 97 Marketing playbooks →

Related playbooks

MarketingWorkflow✓ AI dry run

Build a no-code newsletter agent that picks its own tools

Stand up a weekly newsletter agent in minutes that researches, drafts and files content itself, choosing which tools to use instead of following a rigid flow.

Credit: Annika Helendi

Under an hour
MarketingWorkflow✓ AI dry run

Draft cross-channel posts from each article for approval

Automate the content distribution you dread, drafting Reddit replies and channel posts from your own writing, while nothing publishes without your approval.

Credit: Daria Cupareanu

An afternoon+
MarketingWorkflow✓ AI dry run

Refresh published articles from live search data

Run one agent that researches and drafts a daily article for a target keyword, and a second that revisits published pieces on a biweekly cycle, guided by how each page performs in search.

Credit: Cody Schneider (@codyschneider)

An afternoon+
MarketingWorkflow✓ AI dry run

Test whether an AI agent can take your survey

Run your own paid survey through a free personal agent before launch, then add checks that catch automated responses.

Credit: u/improvedataquality on r/Marketresearch

Under an hour
MarketingWorkflow✓ AI dry run

Turn a Figma design into a WordPress site overnight

Give a coding agent MCP access to your Figma design, let it produce the WordPress site, then review it page by page.

Credit: bnistordev (@bnistordev)

An afternoon+