achanda101 / html-figma

Plugin to import HTML into Figma layers

Home Page:https://www.figma.com/community/plugin/747985167520967365

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Html figma logo


HTML <-> Figma

Figma plugin to convert HTML from a URL to Figma, or convert Figma designs to code via JSX Lite

How does it work

  1. Install the plugin
  2. In Figma, open a new or existing document, then hit cmd+/ and search "html figma" and hit enter
  3. Enter a URL you want to import

Plugin demo

Why?

  • 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!

Chrome extension demo

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

About

Plugin to import HTML into Figma layers

https://www.figma.com/community/plugin/747985167520967365

License:MIT License


Languages

Language:TypeScript 95.0%Language:JavaScript 2.5%Language:HTML 1.8%Language:CSS 0.7%Language:SCSS 0.0%