figma-fsm
v0.0.6
Published
A Figma prototype to XState syntax Finite State Machine representation
Downloads
2
Readme
figma-fsm
Convert Figma Prototype files to Xstate compatible Finite State Machine objects. It uses the Figma REST api to retrieve a file and transforms it into a Finite State Machine that can be visualized here
Installation
The best way is to use npm
npm install figma-fsm
Usage
In Node
const figmaFSM = require("figma-fsm")
figmaFSM(<FigmaToken>, <FigmaFileKey>)
.then(result => // Do something with your result).
In Typescript
import figmaFSM from "figma-fsm";
figmaFSM(<FigmaToken>, <FigmaFileKey>)
.then(result => // Do something with your result).
Getting a Figma Token
The best way is to create one following the instructions in the Figma API Docs.
Next Steps
- Build a CLI tool.
- Build a UI that connects to the visualizer directly.