Figma Plugin

Build, debug, and run a Figma plugin (a code.js sandbox + ui.html iframe pair under integrations/figma-plugin/, built on the Figma Plugin API). Use when creating a new Figma plugin, wiring a 'select a frame → export it → call your API' flow, deciding whether fetch belongs in the sandbox or the iframe UI, adding networkAccess.allowedDomains to manifest.json, or storing an API key in figma.clientStorage. Covers the build path plus the traps that each cost a build round-trip: the two-context split (the sandbox has no DOM but no CORS; the iframe has DOM but full CORS — fetch in the wrong side fails with a useless error), every external origin must be allow-listed in manifest networkAccess.allowedDomains or the request dies at runtime, the sandbox has no FormData/Blob so multipart uploads are hand-rolled byte arrays, the UI must ship as one self-contained HTML file inlined via __html__, and export is async via exportAsync. Sibling of figma-plugin-submission (the Community publish path) and of the other integration

pooriaarab af8987f 6.8 KB Updated

File contents

pooriaarab/skills/tree/main/figma-plugin commit af8987fae5

Frequently asked questions

npx skillmds@latest add pooriaarab/figma-plugin