Aiming for 100% Figma Fidelity with Design.md

A design-token infographic slides into an envelope, followed by a large serif Design.md title

Revisiting the Figma design

This started when I revisited the pay overview screen of a dashboard I had designed. I noticed areas where my design skills had fallen short and thought, “I could have done this differently.” So I decided to revisit the design in Figma from the ground up.

I reviewed the color tokens, added spacing tokens, and aimed to use tokens wherever possible in the frames. Besides making future design changes easier, I thought this might help AI understand the Figma design more clearly.

Figma variables organized into Primitive, Semantic, and Components collections alongside pay overview layouts at different screen sizes

I used this plugin to create Design.md:

Plugin on Figma Community

The Figma design and its design-token setup

Download the generated DESIGN.md

v1: The first implementation

First, I gave Codex the Figma link, an image of the design, and the generated Design.md.

The first generated implementation of the pay overview screen

Visually, the result was reproduced to a high standard. The spacing, color, radius, and font-size tokens also appeared to be respected. However, closing the sidebar revealed elements I had not designed in Figma, hover behavior differed from what I expected, and the responsive layout needed more work. Having designed the UI myself, I noticed several rough edges.

Still, there were only a handful of these issues, and my impression was that they would not take too long to fix.

View the v1 implementation

v2: More detailed specifications

Next, I described the front-end implementation in more detail in Design.md: which libraries and stack to use, such as React + Vite and Highcharts, and specific calendar settings, such as a height of 360px with 15px representing one hour. I then asked for another implementation.

The second implementation, generated with a more detailed stack and interaction specification

The appearance did not change much from the first attempt, and generation took longer, although I could see a small improvement in the interactive behavior.

View the v2 implementation

v3: Refining through conversation with the AI agent

This felt like the limit of asking for a complete implementation in one pass with design.md. From there, I refined the implementation by describing the changes to the AI agent in plain language, without editing the Figma design or code myself. I think those revisions took at least an hour in total.

View the v3 implementation

Fidelity and behavior

For a static website whose appearance does not change in response to user interaction, I would expect a single prompt to achieve a fairly high level of fidelity. The more rigorously the design system is defined in Figma, the more accurate the result should be.

For a dashboard like this one, however, appearance alone is not enough: the behavior also needs to be communicated. Even after revisions, interactions can still differ from what I intended, so iteration and QA take time. I think a stronger understanding of front-end development can help reduce the time spent on those revisions.

The Design.md files used and the results of each version are collected on the comparison site.

← Back to Blog