framer-plugin
Building a Framer plugin
A Framer plugin is a React app that runs in an iframe inside the Framer desktop app, built on the framer-plugin npm package (@framer/plugin). Source lives in integrations/framer-plugin/. It is a thin frontend over your product's SDK or public REST API — the SDK gives you the canvas/selection + plugin window; you supply the logic. Read this before the first file; the command-level playbook is the companion scripts/framer-plugin/README.md.
The headline difference from other marketplaces: publishing is near-instant, with light or no review. No days-long review queue. That makes the build traps — not the submission — the whole game.
When to use
- Triggers: 'build a Framer plugin', 'framer-plugin npm package', 'framer.json manifest', 'Framer dev plugin won't load', 'Framer plugin blank panel', 'get the current Framer selection', 'publish to the Framer Marketplace', 'Framer Community plugin'.
- The dev server must be local HTTPS (plain http://localhost gives a blank panel); framer.showUI must run before the React render; the selection comes from framer.getImage()/subscribeToImage (canvas mode only).
- The zip needs framer.json at its root (zip the contents of dist/); framer.setPluginData is per project file; publishing is near-instant with light or no review.
- Siblings: canva-app, figma-plugin, browser-extension, connector-directory-submission.
The trap that wastes a day: the dev plugin needs local HTTPS
Framer loads a development plugin from a URL — and refuses plain http://localhost. The Vite dev server must serve HTTPS via a local certificate (vite-plugin-mkcert), and you must open that https://localhost:5173 URL in a browser once and accept the certificate, or Framer shows a blank/failed panel with no useful error.
Rule: before debugging "my plugin is a white box," confirm the dev URL loads in a browser without a cert warning. Nothing in the code or the build reveals this — only opening the URL does.