I am using Codex to implement frontend pages from Figma designs, but some Figma files have a messy layout structure. Layers may be poorly named, elements are not grouped consistently, and spacing or alignment rules are unclear.
What workflow do you recommend for accurately recreating the design in this situation?
In particular, I would like to know:
- How should I provide Figma context to Codex when the layer hierarchy is disorganized?
- Should I rely more on screenshots, visual inspection, or extracted design metadata?
- How can I help Codex distinguish actual UI elements from decorative layers, device frames, or presentation-only content?
- How should I split reusable components when the original Figma structure is unreliable?
- What is an efficient way to compare the implemented result with the design and iterate toward pixel-level accuracy?
I would appreciate practical tips or proven workflows from developers who use Codex or similar AI coding tools for Figma-to-code implementation.
Welcome to the community, @MerlinXu !
Out of curiosity, what have you tried so far?
Thanks for the welcome!
So far, I have been using detailed prompts to guide Codex, especially asking it to avoid overusing absolute positioning and to prefer normal document flow, Flexbox, or Grid where appropriate.
I provide as much Figma context as possible, then use screenshots as an additional visual reference for implementation. After Codex generates the page, I take screenshots of the result and review them manually against the original design, then iterate on the differences.
My main challenge is making this workflow more reliable when the Figma file itself has a messy hierarchy or unclear layout rules.