Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sonnylazuardi/framer-sites-figma-plugin

Build figma plugin with low code using framer sites
https://github.com/sonnylazuardi/framer-sites-figma-plugin

figma framer plugin sites

Last synced: 12 days ago
JSON representation

Build figma plugin with low code using framer sites

Awesome Lists containing this project

README

        

# Framer Sites Figma Plugin

Build figma plugin with low code using framer sites

![screen](screenshot.png)

## Framer Sites

Duplicate [this framer site](https://sites.framer.com/projects/new?duplicate=sUTqiLD13aV9nhuIt1gz)

### Code Override

`Examples.tsx`

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

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

Assigning code override

![assign](assign.png)

Autocomplete

![autocomplete](autocomplete.png)

## Figma Plugin

clone [figma plugin examples](https://github.com/figma/plugin-samples/tree/master/webpack-react): `webpack-react`

install framer-sites-figma-plugin

```
yarn add framer-sites-figma-plugin
```

`ui.tsx`

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

const App = () => {
useFramerMessage();
return (

);
};
```

`code.tsx`

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

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