html-figma

0.3.1 • Public • Published

html-figma

WORK IN PROGRESS

Converts DOM nodes to Figma nodes.

Inspired by figma-html.

DEMO: https://www.figma.com/community/plugin/1005496056687344906/html-to-figma-DEV-plugin

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

none

Package Sidebar

Install

npm i html-figma

Weekly Downloads

4

Version

0.3.1

License

MIT

Unpacked Size

77.9 kB

Total Files

36

Last publish

Collaborators

  • sergcen