Ecosyste.ms: Awesome

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

https://github.com/react-figma/figma-api-stub

🤖 A stub implementation of Figma Plugins API.
https://github.com/react-figma/figma-api-stub

figma figma-plugins testing

Last synced: 3 months ago
JSON representation

🤖 A stub implementation of Figma Plugins API.

Lists

README

        

# Figma API Stub

[![npm version](https://img.shields.io/npm/v/figma-api-stub.svg)](https://www.npmjs.com/package/figma-api-stub)
[![CircleCI](https://circleci.com/gh/react-figma/figma-api-stub.svg?style=shield)](https://circleci.com/gh/react-figma/figma-api-stub)

A stub implementation of [Figma Plugins API](https://www.figma.com/plugin-docs/intro/).

```javascript
import {createFigma} from "figma-api-stub";

const figma = createFigma();
const rect = figma.createRectangle();
rect.resize(100, 200);
```

---
⚠️ Warning! It's not an official implementation, and it hasn't the purpose to fully reproduce Figma behavior and API.

---

## Installation

Install it with yarn:

```
yarn add figma-api-stub
```

Or with npm:

```
npm i figma-api-stub --save
```

## API

#### Stub api creation

```javascript
createFigma(): PluginAPI
```

## Used by

- [react-figma](https://github.com/react-figma/react-figma)
- [FigmaToCode](https://github.com/bernaferrari/FigmaToCode)
- [figx](https://github.com/n0ruSh/figx)