Build figma plugin with low code using framer sites
Duplicate this framer site
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
Autocomplete
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);
};