html-to-figma-lib

0.4.7 • Public • Published

html-to-figma-auto-layout

Converts DOM nodes to Figma nodes with extended support for auto-layouts.

Modified fork of https://github.com/sergcen/html-to-figma which was inspired by https://github.com/BuilderIO/figma-html

Example: /dev-plugin

npm i html-figma

USAGE

Browser

import { htmlTofigma } from 'html-figma/browser';

const element = document.getElementById('#element-to-export');

const layersMeta = await htmlTofigma(element);

Figma

import { addLayersToFrame } from 'html-figma/figma';

const rootNode = figma.currentPage;

await addLayersToFrame(layersMeta, rootNode);

Readme

Keywords

Package Sidebar

Install

npm i html-to-figma-lib

Weekly Downloads

1

Version

0.4.7

License

MIT

Unpacked Size

114 kB

Total Files

38

Last publish

Collaborators

  • oleksiy