Dev.to WebDev 🛠 Dev 👁 0 📖 6 min read

Responsive Figma Code Layer: Capture a Page at Desktop, iPad and Phone Widths, Then Brief the AI

Originally published on Crafttor. TL;DR: An AI can only follow a responsive layout it has seen. To build a responsive Figma code layer, capture the same page at Desktop 1440, iPad 820 and a phone width with WebCapture t

Originally published on Crafttor.

TL;DR: An AI can only follow a responsive layout it has seen. To build a responsive Figma code layer, capture the same page at Desktop 1440, iPad 820 and a phone width with WebCapture to Figma. Compare the three captures, write down what changes at each size, and brief Claude, ChatGPT or the code layer's AI with all three. Then check each breakpoint with the checklist below.

A single desktop capture says nothing about how the nav collapses or the grid reflows. So the model invents a mobile layout. The cure is simple: show it every width that matters.

Why one width is not enough

Responsive behaviour is a set of decisions made at breakpoints. A three column grid becomes two, then one. A horizontal nav becomes a menu button. A hero image moves below the headline. Font sizes step down.

None of that is visible in a desktop capture. Each Copy for LLM brief and each import describes the page at the width you captured. To pass on the decisions, you need a capture per layout.

Step 1: Capture the page at three widths

WebCapture to Figma offers these widths: Desktop 1440, iPad 820, Pixel 7, iPhone 14 Pro, iPhone SE, or a 360px Android phone.

A good default set:

Capture Width option Why
Desktop Desktop 1440 Full layout, all columns
Tablet iPad 820 Where most grids and navs change
Phone iPhone 14 Pro, Pixel 7 or 360px Android Single column layout

If your audience skews to small Android phones, pick the 360px option for the phone capture. If you care about very small iPhones, add iPhone SE as a fourth.

Import each capture as editable frames and lay them out in a row, left to right, from widest to narrowest. Name them "Desktop 1440", "iPad 820" and "Phone". For more on phone and tablet capture, see capturing tablet and phone layouts as editable layers.

Capture or rebuild only designs you own or have permission to use.

Step 2: Write a change log between widths

Before you brief any AI, spend ten minutes comparing the three frames. Write down every difference, section by section. This short document is the most valuable part of the whole process.

An example:

  • Header. Desktop: logo, five links, button. iPad: logo, button, menu icon. Phone: logo and menu icon only.
  • Hero. Desktop: text left, image right. iPad: stacked, image below. Phone: stacked, image hidden.
  • Feature grid. Desktop: three columns. iPad: two. Phone: one.
  • Headline size. Steps down at each width. Note the values from the frames.
  • Footer. Desktop: four columns. Phone: accordion style groups.

Because the imports carry real type and layout, you can read exact sizes from the frames instead of guessing.

Step 3: Brief the AI with all three

The extension captures the page as you see it, so set the browser to each layout first. Chrome DevTools device mode makes that easy. Capture once per width and press Copy for LLM for each one. Each brief carries the layout, colours with real gradient stops, border and shadow values, fonts, icons as inline SVG and every interaction for that width.

Paste them into one message to Claude, ChatGPT or a Figma code layer's AI, in order, each with a clear label. Then add your change log and the instruction:

"Below are three captures of the same page: DESKTOP 1440, TABLET 820, PHONE. Build one responsive HTML and CSS page that matches each capture at its width. Write mobile first CSS. Add breakpoints between the captured widths. Follow the CHANGE LOG exactly. Do not invent layouts for widths that differ from the captures. Keep colours, fonts and icons exactly as given."

If the combined text is long, split the work. Ask for the phone layout first, then "now add the tablet breakpoint", then "now add desktop". Each step is easier to check.

Step 4: Test the responsive Figma code layer at each width

Create a code layer in Figma and let its AI build from the brief, or paste the code from Claude or ChatGPT into it. Then duplicate the layer and set each copy to one of the captured widths by hand. Place each copy under the matching frame.

Now you have a grid: captured frames on top, running code layers below.

Hover states, transitions and keyframe animations play in the code layers too. That matters on touch layouts, where some hover effects should be replaced by tap states.

Breakpoint checklist

Run through this at each width. Mark pass or fail.

Layout

  • [ ] Column count matches the capture.
  • [ ] Section order matches the capture.
  • [ ] No horizontal scroll at the phone width.
  • [ ] Gutters and side padding match the frame.

Navigation

  • [ ] The nav collapses at the same width as the live site.
  • [ ] The menu button opens and closes.
  • [ ] The primary button is still visible on the phone.

Type

  • [ ] Headline size steps down as in the captures.
  • [ ] Line length stays readable on the tablet.
  • [ ] No text overflows its container.

Media

  • [ ] Images hidden on the phone capture are hidden in the build.
  • [ ] Images keep their aspect ratio.
  • [ ] Icons are the page's own SVGs at every width.

In between widths

  • [ ] Resize one copy to a width between two captures. The layout should still hold.
  • [ ] No element jumps or collapses unexpectedly near a breakpoint.

That last group is where most AI built pages fail. The captures pin three points. The space between them is where you have to look.

Choosing breakpoint values

The captures tell you which layouts exist. They do not tell you the exact pixel where the live site switches. You have three reasonable options:

  1. Use your own codebase values, if this is your site and you know them.
  2. Use the captured widths as anchors and put breakpoints between them, for example min-width: 821px for desktop rules.
  3. Ask the model to choose, then test the in between widths and adjust.

Write breakpoints as min-width queries on top of mobile first defaults. It keeps the CSS easier to read:

.features { display: grid; grid-template-columns: 1fr; gap: 16px; }

@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .features { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

If you are starting from screenshots rather than live captures, our guide to screenshot to responsive HTML covers that route.

When you want the exact page instead

Sometimes you do not need a rebuild. You need the captured page running as it was, at each width. After an import, the plugin's Download HTML saves a ready to run HTML, CSS and JS project. Copy prompt gives Claude, with the Figma MCP connected, what it needs to add it as a code layer beside your frame. Figma plugins cannot create code layers themselves, so Claude does the last step. Code layers cannot be resized from the API, so set it to the size the prompt names.

That route reproduces one capture faithfully. The three capture brief is the route for one responsive build.

Privacy

URL captures send only the URL to Apify, rendered with your own Apify token. A free Apify account is enough to start. Extension captures stay on your machine and need no token. Nothing from your Figma file is uploaded, and the plugin never sends anything to an AI.

Make the AI see every width

Three captures and a short change log turn "make it responsive" from a guess into a spec. Set up the grid once and every later change can be checked at every width.

WebCapture to Figma is free. Capture your page at Desktop 1440, iPad 820 and a phone width, and brief your next responsive Figma code layer properly.

FAQ

What widths can WebCapture to Figma capture?

Desktop 1440, iPad 820, Pixel 7, iPhone 14 Pro, iPhone SE, or a 360px Android phone.

Why not give the AI only the desktop capture?

Each capture describes one width. Without the tablet and phone captures, the model has to invent how the layout changes.

Can I resize a code layer to test breakpoints?

Yes, by hand in Figma. Code layers cannot be resized from the API, so set each copy's width yourself.

Does the capture tell me the site's exact breakpoint values?

No. It shows the layout at each captured width. Use your own code's values if you have them, or place breakpoints between the captured widths and test.

Do hover effects work in the responsive code layer?

Yes. Hover states, transitions and keyframe animations play in a code layer. Check whether phone layouts need tap states instead.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.