Can we export design into code exactly how we write the code?

I would like to inquire about the possibility of exporting our website or SaaS application design from Figma into fully flexible HTML code from Figma.
Is such a feature available, and if so, could you kindly provide me with further information on how to accomplish this ?
P.s - I am aware that we can export html code but Can we export fully flexible code like how a developer write the code.

Hey Gleb.
Design is fun but restore it is not
especially when I have to do it again and again.

I have tried to build a such tool but finally failed.

I can do it if auto-layout is applied to the design but I think I can not force people use auto-layout. Then I find it is really hard for me to transform layout from Figma to the way I code.

In order to solve this, I try to transform absolute layout to flex layout (auto-layout in web)
The basic algorithm is

1: get all elements from Figma api
2: get all bounding box with x, y width, height
3: try to seperate the box into different lines ( if elements overlap then same line)
4: for every line, if elemets overlap, find the minimum elements that should use absolute position
5: apply other attributes based on Figma api doc

I was wondering if it can solve the problem.
It can save my day!

For anyone that sees this:

@yujie_wu created a new topic over here. If you have any suggestions, please post them over there :smiley: