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: 15 days ago
JSON representation
🤖 A stub implementation of Figma Plugins API.
- Host: GitHub
- URL: https://github.com/react-figma/figma-api-stub
- Owner: react-figma
- License: mit
- Created: 2019-10-10T16:10:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-09T15:53:46.000Z (7 months ago)
- Last Synced: 2024-10-29T21:05:28.580Z (3 months ago)
- Topics: figma, figma-plugins, testing
- Language: TypeScript
- Homepage:
- Size: 326 KB
- Stars: 46
- Watchers: 6
- Forks: 14
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-figma - figma-api-stub - Figma API Stub. (Plugins development)
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)