figspec

Unofficial static Figma frame/file viewer available as HTML CustomElement

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
import { FigspecFrameViewer } from "../../src";

import * as demoFrame from "./demo-data/Klm6pxIZSaJFiOMX5FpTul9F/64:1.json";
import demoImage from "./demo-data/Klm6pxIZSaJFiOMX5FpTul9F/64:1.svg";

const el = document.getElementById("demo");

if (el && el instanceof FigspecFrameViewer) {
  // @ts-ignore
  el.nodes = demoFrame;
  el.renderedImage = demoImage;
}