Giter Site home page Giter Site logo

sumonst21 / figma-html Goto Github PK

View Code? Open in Web Editor NEW

This project forked from builderio/figma-html

0.0 2.0 0.0 5.43 MB

Figma to HTML, CSS, React, Vue, and more!

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

License: MIT License

TypeScript 94.91% CSS 0.74% HTML 1.79% JavaScript 2.54% SCSS 0.02%

figma-html's Introduction

Figma to HTML title

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


How does it work

Export designs to code

  1. Install the plugin
  2. Ensure all layers you want to import use autolayout as described here
  3. Click the "get code" button to launch into the Builder.io editor
  4. 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

JSX Lite diagram

Import webpages to Figma designs

  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?

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

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

figma-html's People

Contributors

dependabot[bot] avatar samijaber avatar steve8708 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.