Skip to content

sonnylazuardi/framer-sites-figma-plugin

Repository files navigation

Framer Sites Figma Plugin

Build figma plugin with low code using framer sites

screen

Framer Sites

Duplicate this framer site

Code Override

Examples.tsx

import { figma, postFigmaMessage } from "./FigmaApi.tsx"

export function createPage(Component): ComponentType {
    return (props) => {
        return (
            <Component
                {...props}
                onClick={async () => {
                    postFigmaMessage(() => {
                        figma.createPage()
                    })
                }}
            />
        )
    }
}

Assigning code override

assign

Autocomplete

autocomplete

Figma Plugin

clone figma plugin examples: webpack-react

install framer-sites-figma-plugin

yarn add framer-sites-figma-plugin

ui.tsx

import useFramerMessage from "framer-sites-figma-plugin";

const App = () => {
  useFramerMessage();
  return (
    <iframe
      src="https://figmaplugin.framer.website/" // your framer sites url
      loading="lazy"
      style={{ width: "100%", height: "100%", border: "none" }}
    ></iframe>
  );
};

code.tsx

import framerOnMessage from "framer-sites-figma-plugin/lib/api";

figma.ui.onmessage = (msg) => {
  framerOnMessage(msg);
};

About

Build figma plugin with low code using framer sites

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published