figma转换html,GitHub - BuilderIO/figma-html: Figma to HTML, CSS, React, Vue, and more!

使用Builder.IO的figma-html插件,可以将Figma设计高效地转换为高质量的HTML、React、Vue等代码。通过JSX Lite实现,支持将网页导入到Figma设计中,方便快速创建网页原型并直接发布。虽然存在一些限制,如不支持所有元素类型和CSS属性,但能显著节省设计和开发时间。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

793d473a4ec6f08536f48b75714cdbb1.png

Convert Figma designs into high quality HTML, React, Vue, Svelte, Angular, Solid, etc code via JSX Lite

68747470733a2f2f692e696d6775722e636f6d2f426f4b734c46732e676966

How does it work

Export designs to code

Ensure all layers you want to import use autolayout as described here

Click the "get code" button to launch into the Builder.io editor

Make any final adjustments, and click "get code" at the top of Builder to view code output, or copy and paste it to content of a Builder account to publish live

e417bccb16da9d234efe50f8a34c0b63.png

Import webpages to Figma designs

In Figma, open a new or existing document, then hit cmd+/ and search "html figma" and hit enter

Enter a URL you want to import

68747470733a2f2f692e696d6775722e636f6d2f594e44443964482e676966

Why?

Instantly convert designs into live webpages and code

Easily import real live site styles for a starting point for designs and prototypes

Quickly turn real site components into design components

Easy import from storybook, etc

Chrome Extension

Want to capture a page behind an auth wall, or in a specific state you need to navigate to? Then the chrome extension is for you!

68747470733a2f2f696d6775722e636f6d2f41527a31364b432e676966

Using the library

// npm install @builder.io/html-to-figma

import { htmlToFigma } from "@builder.io/html-to-figma";

const layers = htmlToFigma(document.body);

// E.g. send these to the REST API, or generate a .figma.json file that can be uploaded through the Figma plugin

Limitations

Importing HTML layers to Figma is a best-effort process. Even getting 90% there can save you a ton of time, only having to clean up a few things.

A few known limitations:

not all element types are supported (e.g. iframe, pseudoelements)

not all CSS properties are supported or fully supported

not all types of media are supported (video, animated gifs, etc)

all fonts have to be uploaded to Figma or a best effort fallback will be used

If you find any issues or have feedback at all please make an issue

TODO

Support code import from JSX Lite

Support Figma components

Made with ❤️ by Builder.io

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值