A designer sends you a Figma link. You open it, and it is beautiful: soft shadows, generous spacing, a hero that breathes. Then you start building it and the cracks appear — the same gray appears in six slightly different hex values, the card grid collapses at 768px because three columns of fixed width simply do not fit, and the primary button is a different height on the settings page than on the dashboard. The mockup was never wrong in a way you could see. It was wrong in a way you could only feel three days into the sprint.
That gap — between a picture that looks finished and a file that is actually buildable — is where LLM prompts for Figma and UI design earn their keep. Not as a magic button that "designs the app," but as a tireless second pair of eyes that reads a structure and tells you what will break. Below I walk through the stages where a text model genuinely helps: pulling design-system tokens out of a mockup, auditing the grid and responsiveness, writing specs a developer can act on, and translating Figma structure into HTML/Tailwind or React. And I am honest about the stage where it hands you a gorgeous lie.
What can an LLM actually do with a Figma file — and what can it not?
Start with the boundary, because almost every disappointment comes from crossing it. A text model cannot open Figma and look at your canvas. It has no eyes. What it can do is work with a description of your file — a JSON export of the node tree, a list of styles and variables, a screenshot you describe in words, or the CSS you copy out of Dev Mode. Everything useful in this article depends on that one move: you turn the mockup into text, and the model reasons over the text. More on the topic: “Figma, Tokens, and Handoff: 12 LLM Prompts That Turn a Text Model Into a UI/UX Co-Pilot”.
That distinction changes what you ask for. "Make this look better" is a request to a pair of eyes the model does not have. "Here are 14 color variables and 9 text styles; find duplicates, near-duplicates, and orphans" is a request it can nail.
Here is the export you actually want. In Figma, the local variables and styles can be pulled through the Variables panel or a plugin, and Dev Mode gives you per-node CSS. A trimmed version of what you paste looks like this:
{
"colors": [
{"name": "gray/900", "value": "#111827"},
{"name": "gray/800", "value": "#1F2937"},
{"name": "text/primary", "value": "#111827"},
{"name": "text/heading", "value": "#11182A"},
{"name": "border/subtle", "value": "#E5E7EB"},
{"name": "border/light", "value": "#E6E8EB"}
],
"spacing": [4, 8, 12, 16, 24, 32, 40, 48, 64],
"radii": {"sm": 4, "md": 8, "lg": 12, "pill": 999}
}
Notice gray/900 and text/primary are the same value, and border/subtle vs border/light differ by a hair. That is exactly the kind of thing a model spots instantly and a human scrolls past for months.
How do I get a real design-system token set out of a messy mockup?
The first job is the one designers dread: turning a file with 60 colors into a token system with 12. You do not want the model to invent a palette from scratch — you want it to find the pattern already in your file and collapse it. That is a classification task, and classification is what text models do well. More on the topic: “Twelve Prompts That Turn an LLM Into a Web Dev Lead: JavaScript and TypeScript Workflow From Project Architecture to Deploy”.
Task: collapse an exported color and spacing list into a named, semantic token set with a clear scale.
Prompt:
You are a design-systems engineer. Below is a JSON export of colors, spacing, and radii from a Figma file that grew organically and now has duplicates.
Do three things:
1. Group colors that are perceptually near-identical (same hue, value within a few percent). For each group, list the members and pick ONE canonical value, and explain in one line which to keep and why.
2. Propose a semantic layer: name tokens by ROLE (surface, text-primary, text-muted, border-default, accent, danger), not by appearance. Map each semantic token to one canonical value from step 1.
3. Do the same for spacing: identify the base unit and flag any value that is not a multiple of it.
Output as three tables (canonical colors, semantic mapping, spacing scale) plus a short list of "decisions a human must confirm" — things you are not sure about.
DATA:
{{paste the JSON export}}
More on the topic: “UI/UX Design with Figma: How to Master Interface Design Without Stepping on the Rakes”.
Example result (trimmed): the model returns that #111827 and #11182A belong to one group — they differ by 3 in the blue channel, invisible on screen — and recommends keeping #111827. It maps text-primary → #111827, border-default → #E5E7EB, and flags border/light as a duplicate to delete. On spacing it notices 12 and 40 are not multiples of the 8 base and asks whether they are intentional or drift.
That last part matters more than the tables. A good prompt makes the model surface its uncertainty instead of silently guessing. When I first started doing this, I asked for a clean token list and got one — confident, tidy, and wrong about three colors that were actually intentional brand accents. Asking for a "decisions a human must confirm" section fixed it. The model still proposes; you still decide.
The mockup looks fine to me — how do I make the LLM find what will break?
This is the highest-value prompt in the whole article, because grid and responsiveness failures are invisible in a static frame and expensive in production. The trick is to stop asking "is this good?" and start asking "at what width does this break, and why?" Give the model the layout structure — columns, fixed widths, gaps, breakpoints — and make it do arithmetic.
Task: audit a card grid and a nav bar for responsive failure points.
Prompt:
You are a front-end engineer reviewing a layout spec before build. Below is the structure of a section. Do not praise it. Find where it breaks.
For each breakpoint you consider (320, 375, 768, 1024, 1280, 1440), compute whether the children fit inside the container, showing the arithmetic. A child fits if: (columns * min-width) + ((columns - 1) * gap) <= container width - (2 * padding).
Then list, in priority order, every place where content overflows, text has no room to wrap, or a fixed width exceeds the container. For each, give the smallest change that fixes it (drop a column, switch to fluid, reduce padding).
STRUCTURE:
Section container: max-width 1200px, padding 24px, centered.
Card grid: 3 columns, each card min-width 340px, gap 24px.
Nav: logo 120px fixed + 5 links of ~90px each + a 140px button, gap 32px, no wrap.
Example result: the model computes that at 768px the container is 768 − 48 = 720px of usable width, but 3 × 340 + 2 × 24 = 1068px — overflow of 348px. It recommends dropping to 2 columns below 1024px and 1 below 640px, and points out the nav needs 120 + 5×90 + 140 + 5×32 = 930px, so it will collide with the logo somewhere around 950px unless the links collapse into a menu. Those are real numbers you can check with a calculator, which is the point: verifiable output, not vibes.
If you want a fuller prompt kit built specifically around catching handoff mistakes before they cost a sprint, that is its own deep topic. More on the topic: “Your Figma File Is a Contract, Not a Picture: 12 LLM Prompts That Catch Handoff Blunders Before They Cost You a Sprint”. More on the topic: “Twelve Ways to Make an LLM Your Art Director: Prompts That Turn a Text Model Into a Brief, a Critic, and a Series Editor for Midjourney, DALL-E, Stable Diffusion and Flux”.
Where does the model quietly lie to me?
Here is the honest part. Ask an LLM to "convert this mockup to React" in one shot and you get something that compiles, looks plausible in a screenshot, and is wrong in ways that cost you an afternoon. The failures are predictable: More on the topic: “React Prompts That Kill useEffect Hell: A Working Cheat Sheet for Components, Hooks, and Tests”.
- Invented spacing and colors. It "remembers" a shadow or a gray that was never in your file, because it is pattern-matching to typical designs, not reading yours.
- Hardcoded values instead of tokens. It writes
#111827inline rather than referencing yourtext-primarytoken, so your theme breaks the moment brand changes it. - Fake accessibility. It adds
aria-labelto things that do not need it and omits it where it matters, then claims the result is accessible. - Plausible but wrong semantics. A
<div>where a<button>belongs, a clickable row with no keyboard handling.
The fix is not a better model. It is a prompt that forbids invention and demands traceability — every value must point back to a token or a node you supplied, and anything it cannot source must be listed as an open question rather than filled in.
| What you ask | What you get |
|---|---|
| "Convert this to React" | Confident code with invented values |
| "Convert using ONLY these tokens; list anything you had to guess" | Code you can diff against the file |
| "Make it accessible" | Scattered aria-labels, some wrong |
| "Flag every interactive element and say which HTML element it should be" | A checklist you verify by hand |
How do I turn the Figma structure into HTML/Tailwind or a React component without garbage?
Feed it the node tree and the token set, and constrain it hard. The goal is not the prettiest code — it is code a developer can trust because every class traces to a token and every unknown is flagged.
Task: convert a card component to Tailwind, token-first, no invention.
Prompt:
Convert the Figma node below into a single React component using Tailwind classes.
Rules:
- Use ONLY the design tokens provided. Every color, spacing, and radius value must map to a token; if a value in the node has no matching token, do NOT invent one — add it to an "unmapped values" list at the end.
- Use semantic HTML: the whole card is not a button, but if it is clickable, make the interactive element a real <button> or <a>.
- Do not add aria-* attributes unless you can justify each one in a comment.
- Keep it to one file. No external state libraries.
TOKENS: {{spacing scale, color roles, radii}}
NODE:
{{paste the node tree: frame "Card", padding 24, radius 12, gap 16, children: image 100% height 180, title text-style heading-sm, body text-style body, button "Open" primary}}
More on the topic: “React — Modern Frontend: What to Know Before You Start and Where Even Experienced Developers Stumble”.
Example result: you get a component that uses p-6, rounded-lg, gap-4, text-primary, and a <button> with the primary token — no magic hex codes. At the end, an "unmapped values" note says the 180px image height has no token and suggests either adding an aspect-ratio token or using aspect-[16/9]. That note is the model doing its job: it told you where it was guessing instead of hiding it.
This is the same discipline that makes LLM help reliable across the whole design-to-code pipeline, from wireframe to handoff spec. More on the topic: “Figma Without a Designer: How LLMs Turn Wireframes Into a Component System, Accessible UI, and Handoff-Ready Specs”.
What about accessibility and contrast — can the model check that?
Contrast is arithmetic, and arithmetic is exactly what a text model is good at — if you make it compute rather than eyeball. Ask it to calculate the WCAG contrast ratio between your text and background tokens and to flag anything under 4.5:1 for body text.
Task: check every text/background pair for contrast compliance.
Prompt:
For each foreground/background pair below, compute the WCAG 2.1 contrast ratio using the relative luminance formula. State the ratio to two decimals and whether it passes AA for normal text (4.5:1), AA for large text (3:1), and AAA (7:1). Do not guess — compute. If a pair fails, suggest the nearest passing value by adjusting the foreground lightness only, and show the new ratio.
PAIRS:
text-muted #6B7280 on surface #FFFFFF
text-primary #111827 on surface #FFFFFF
accent #3B82F6 on surface #FFFFFF
white #FFFFFF on danger #EF4444
Example result: the model computes text-muted on white at roughly 4.83:1 (passes AA normal), accent blue on white at about 3.68:1 (fails AA normal text, passes only large text), and white on the red danger at about 3.76:1 (fails for normal text). It then proposes darkening the accent slightly and shows the new ratio. You can verify any of these with the formula yourself — which is the whole point. A ratio is not an opinion; either it passes or it does not.
What does a spec for the developer actually look like when the LLM writes it?
A handoff spec dies when it says "button, blue, medium." It lives when it says which token, which states, which breakpoints, and what happens on overflow. The model is good at expanding a terse note into a complete spec — as long as you give it the states to cover.
Task: expand a component note into a buildable spec.
Prompt:
Turn this component note into a developer spec. Cover: default, hover, focus, active, disabled, and loading states; the token for each visual property; behavior at 320/768/1280px; keyboard interaction; and empty/error content cases. Where the note is silent, write an explicit "DECISION NEEDED" line instead of inventing behavior.
NOTE: Primary button. Blue background, white label, 12px radius, 40px height. Used on forms and in the header.
Example result: you get a table of states with tokens (bg-accent, bg-accent-hover), a focus ring spec (2px offset, visible on keyboard only), a note that the 40px height is below the 44px touch-target recommendation at mobile, and two "DECISION NEEDED" lines — what the loading state looks like and whether the header variant is allowed to shrink on scroll. The model did not decide those for you; it surfaced them. That is the difference between a spec that unblocks a developer and one that generates three Slack threads.
So where does it actually save time — and where does it just look impressive?
After running this workflow on real files, the split is clear. The model is strong where the task has a checkable answer: deduplicating tokens, computing contrast, doing grid arithmetic, expanding a note into states, flagging unmapped values. It is weak where the task needs judgment about intent: whether a layout feels right, whether a color is on-brand, whether a flow makes sense. It will answer those too — confidently, fluently, and with nothing behind the answer.
So the practical rule is simple: point the model at the parts of the job that have a right answer you can verify, and keep the taste calls for yourself. Use it to catch the six grays and the grid that collapses at 768px, to write the spec that lists its own open questions, to generate code that flags every value it could not trace to a token. Skip it for "make this beautiful." That was never a text problem.
The designers and developers who get real leverage here are not the ones with the cleverest single prompt. They are the ones who built the habit of demanding verifiable output — arithmetic shown, tokens traced, guesses labeled — and who treat every confident sentence from the model as a claim to check, not a fact to ship. Start with one prompt from this article on your current file. The grid audit is the fastest place to feel the difference: ten minutes of arithmetic that saves you a broken layout three days into the sprint.
Rules and figures are stated as of November 2026.