Many Figma to Code tools have one or more problems of the follwings:
- 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
Figma to React Component outputs React code in the plugin UI and can be genrated by selecting certain node. And its style is derived from Auto Layout properties, thus is responsive.
npm install
npm run devFeel free to folk this repositoty, create and publish your own Figma to Vue, Flutter, SwiftUI or whatsoever!
buildTagTree method would be useful for such case.
buildTagTree metssod 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[]
}