From Figma to a working site with AI: keep the design intact
How to turn a Figma mockup into code with Claude, ChatGPT or Cursor so the site matches: file prep, prompt, review and animation.

AI turns mockups into code well, but often slightly off: different spacing, font, shifted buttons. The cause is usually how the mockup and task are prepared.
Prepare the mockup
- Use auto layout: AI understands spacing better.
- Name layers clearly: header, hero, cta.
- Keep colors and fonts as styles to list in the prompt.
- Make a separate phone screen.
What to give the AI
- Sharp screenshots of every screen.
- A token list: colors, fonts, sizes, radii.
- Behavior: hover, menu opening, scroll.

Prompt template
Build this screen exactly. Font Inter, sizes 64/32/16.
Spacing in multiples of 8. Colors: background #0B0B0C, text #F2F2F4, accent #B9F27C.
One column on phones. Add nothing that is not in the mockup.Review
Put a site screenshot next to the mockup, list the differences and give the list to the AI. Lists work better than “make it like the mockup”.
Animation
A static mockup does not say how things move. Describe motion in words or use ready components.
If your mockup has animated menus, buttons or cards, take similar ones from the catalog and let AI adapt them.




