Skip to content
프로젝트

소개

Figma에서 React 코드를 간단히 생성하는 도구

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

test Maintenance PRs Welcome Tweeting

Figma to React logo

Figma to React Component

Install Plugin

https://user-images.githubusercontent.com/6080698/116072313-de1cd180-a6c9-11eb-8e32-fe9a2f9a79f8.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 settingPlugin 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[]
}

관련 프로젝트 살펴보기

불러오는 중…