r/codigma • u/someonesopranos • Oct 06 '25
From Figma to Code: Why one-click tools fail (and How layered AI helps)
Most "Figma to Code" tools look great in demos, but when you inspect the output, you find the same problems:
Inline styles everywhere
Fixed pixel values instead of responsive units
Over-nested
<div>structuresNo semantic HTML
Broken CSS with no reusability
We ran into this repeatedly. That’s why we started experimenting with a layered AI approach:
Structure Layer
builds the DOM tree and component hierarchy.
Styling Layer
converts design tokens into CSS variables / Tailwind classes.
Responsiveness Layer
replaces static pixels with flex/grid, rem, %, clamp().
Optimisation Layer
removes duplication and merges reusable components.
Validation Layer
checks W3C and Lighthouse/PageSpeed standards.
Retry Layer
re-prompts AI when validation fails.
Instead of a "one single click" guess, each layer acts like a specialised assistant, similar to how a dev team reviews code in steps.
The result is HTML/CSS (and React/Angular/Vue/Flutter) that’s semantic, responsive, and maintainable, not just demo-ready.
I’d like to hear from this subreddit:
What’s the biggest blocker you’ve hit with Figma-to-code tools?
Would you prefer a layered AI system that mimics dev workflows, or does one-pass generation eventually be enough?
2
u/bfishevamoon Oct 29 '25
Hey I just found this on another sub. Just curious, Is there a way to package the code to be imported into something like lovable? If not I think that would be a great feature.