TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why not generate React code from Figma? (a.k.a. why did PageDraw YC18 fail?)

10 点作者 robertnowell超过 3 年前
I&#x27;ve been a little obsessed recently with why PageDraw failed (https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16467387). Pagedraw promised to generate react code from sketch or figma designs.<p>It would make my life much easier if they had succeeded. In that world, when my cofounder and I finish polishing our designs in figma, we click a button and (most of) the React UI code is written for us. All we would have to do is wire up the generated components to data sources, and voila. Take the rest of the day off.<p>If it had worked well, it could automate a good amount of the boring UI work I need to do on a consistent basis. Why am I still manually writing styled components when the information is all there in figma already?<p>What do you think, HN?<p>Curious if anyone knows of great solutions for this problem or thinks that something like this should (or shouldn&#x27;t &#x2F; couldn&#x27;t) exist.<p>What do folks think of Anima? https:&#x2F;&#x2F;www.animaapp.com&#x2F;blog&#x2F;design-to-code&#x2F;how-to-export-figma-to-react&#x2F;<p>Or Overlay? https:&#x2F;&#x2F;www.overlay-tech.com&#x2F;<p>Figma&#x27;s own blog post on this: https:&#x2F;&#x2F;www.figma.com&#x2F;blog&#x2F;introducing-figma-to-react&#x2F;<p>A reddit discussion: https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;FigmaDesign&#x2F;comments&#x2F;ht9krs&#x2F;best_way_to_convert_designs_from_figma_to_react&#x2F;<p>Is anyone else working on this?

7 条评论

Jefro118超过 3 年前
I&#x27;m working on this with <a href="https:&#x2F;&#x2F;pygma.app" rel="nofollow">https:&#x2F;&#x2F;pygma.app</a>. I was too quite surprised that no one has done a better job of this yet. One obvious issue is that Figma works in absolute positions and this is generally a bad way of writing CSS, but this is mostly overcome with some simple heuristics. At the moment my product is more like Overlay, which produces code that is visually consistent but often not semantic or what the designer would have intended. I think this can largely be solved with machine learning, computer vision in particular. Uizard seems like the most impressive product in this regard but their use case is slightly different.<p>Another problem is that most product teams don&#x27;t just need to generate code once but also keep it in sync with Figma. As far as I can tell, no one has solved the syncing problem in either direction particularly well. I actually think syncing from React -&gt; Figma is not fundamentally difficult but you need to build a big hairy compiler to deal with any React + styling code which would be a PITA. Going in the other direction is more fundamentally difficult I think, probably needs very good machine learning as well.<p>Also, always love to hear more details about precisely what&#x27;s so painful and boring about the way you deal with it now?
评论 #28215916 未加载
jokethrowaway超过 3 年前
This is painfully visible in big web agencies with tons of clients.<p>The flow of designs to be turned into code is relentless, it&#x27;s almost like a factory.<p>The reason this doesn&#x27;t get solved is that you&#x27;ll always need a developer to smooth the edges, making it responsive, check things work properly everywhere.<p>There is just too much cruft in the web for full proper automation and there are plenty of frontend developers who barely know how to code but knows how to write React component at a relatively low price.<p>For individual product companies the effort to create something like this would be too big. Adopting an emergent third party solution instead of throwing frontenders at the problem would be a risky proposition.<p>Agencies would be the perfect candidate for buying something like this but the cost of developers can easily be passed down to the customer - and if they&#x27;re big enough to have a lot of clients, they make money because of their brand, not because they&#x27;re particularly cheap.<p>I don&#x27;t think we&#x27;ll see a solution to this before General Artificial Intelligence; the incentives for building a custom solution for this problem are low and the cost is relatively high.<p>Maybe if the web as we know were to become simpler &#x2F; standardised (imagine having native views with native components configured by web services, instead of the wild west of an html page) this could become doable.
评论 #28215954 未加载
Etheryte超过 3 年前
There have been attempts at tools like this more or less as long as I can remember. The earliest one I recall seeing was Adobe Photoshop exporting sliced designs, but I&#x27;m sure there were similar takes earlier too. There are two main issues that are more or less universal: generating reasonable code, and drawing the rest of the owl. The first part does not need much explanation, teaching a machine to generate reasonable code that&#x27;s understandably structured is akin to teaching a machine to program in general. Context is hard and the output of such programs is generally a big mess. The second problem is drawing the rest of the owl [0]. Wiring up a frontend to a backend is not a trivial task, and one that I would argue to date does not have solid universal solutions. There are many companies and libraries trying to address this in different ways, but they all come with their own pains. Asking a tool to nail down both of the above issues is a very, very tall order and I don&#x27;t expect anyone to succeed for the general case anytime soon. I do think great progress can be made in narrower scopes though.<p>[0] <a href="https:&#x2F;&#x2F;knowyourmeme.com&#x2F;memes&#x2F;how-to-draw-an-owl" rel="nofollow">https:&#x2F;&#x2F;knowyourmeme.com&#x2F;memes&#x2F;how-to-draw-an-owl</a>
评论 #28204048 未加载
plasmic超过 3 年前
Yeah, we&#x27;re working on this at Plasmic:<p><a href="https:&#x2F;&#x2F;www.plasmic.app&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.plasmic.app&#x2F;</a><p>(Our users include ex-PageDraw&#x2F;Anima users.)
sdrinf超过 3 年前
What I find particularly funny, looking at the big-picture capability of &quot;designer tool generating extendable code&quot;, this was basically available since... visual studio 2005? Yet, no one have found a business model for interfacing figma-react reliably at scale.<p>OTOH, for the capability itself, you might want to look at <a href="https:&#x2F;&#x2F;reactstudio.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;reactstudio.com&#x2F;</a> .
评论 #28207580 未加载
hcho超过 3 年前
I suspect, genarating components from designs is a pain point for narrow subsection of companies which use React. I also suspect those which have this problem are not in a place to pay. Startups with limited runways, agencies with shoestring budgets are not the most lucrative.
jtchang超过 3 年前
Because the issue is the interactions between the components and not the components themselves.
评论 #28210905 未加载