Giter VIP home page Giter VIP logo

figma-to-react's Introduction

test Maintenance PRs Welcome Tweeting

Figma to React logo

Figma to React Component

Install Plugin

figma-to-react-demo-en.mov

The Problem

Many Figma to Code tools have one or more problems of the followings:

  • generates for whole Figma file(not by component)
  • need to go outside of Figma to visit service's site
  • layout style is not responsive, and is absolute positioned to its parent

Solution

Figma to React Component outputs React code in the plugin UI and can be generated by selecting certain node. And its style is derived from Auto Layout properties, thus is responsive.

How the plugin works

Further features

Change CSS format and size

You may choose either Pure CSS or styled-components, and you may also change size for px and rem.

change format

Component setting

You may add component setting. When you add component setting including component name, name of children node(optional), and props(optional), the plugin will render matched node as component.

adding Banner component setting

Plugin generates Banner as component

Development

npm install
npm run dev

For Those of you Who would like to create your own Figma to xxx

Feel free to folk this repository, create and publish your own Figma to Vue, Flutter, SwiftUI or whatsoever!

buildTagTree method would be useful for such case. buildTagTree method outputs a tag object in the following format which is independent from how the final outcome is structured.

export type Tag = {
  name: string
  isText: boolean
  textCharacters: string | null
  isImg: boolean
  properties: Property[]
  css: CSSData
  children: Tag[]
}

figma-to-react's People

Contributors

kazuyaseki avatar qqpann avatar renovate-bot 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.