Giter Site home page Giter Site logo

figma-fsm's Introduction

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

๐Ÿ†• Try it out with an UI here: Figma FSM UI

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.

figma-fsm's People

Contributors

ddanielbee avatar

Stargazers

Yuri Mikhin avatar Tyson Kubota avatar  avatar Reza Faiz Atta Rahman avatar Joshua Ferrell avatar Luke Doig avatar parker gibbons avatar Devin Halladay avatar I Made Budi Surya Darma avatar Angelo avatar Andika Tulus Pangestu avatar Ilya Lesik avatar Sonny Lazuardi avatar Joel Louzado avatar Tomas Faltejsek avatar  avatar Wilcox avatar Schalk Venter avatar kctdfh avatar Robert Penner avatar Thomas B Homburg avatar Darren Butcher avatar Askar Yusupov avatar Kelli Rockwell avatar  avatar  avatar Andrejs Agejevs avatar Felipe Salazar avatar Michele Mazzuco avatar Cristiano Rastelli avatar Nitin Tulswani avatar Michele Bertoli avatar Mikael Karon avatar Travis Arnold avatar Gabriel avatar David Khourshid avatar  avatar

Watchers

James Cloos avatar  avatar

figma-fsm's Issues

Recursively find Child nodes with transitionIds

Currently, we're going only one level deep. Sometimes, Figma groups have the transitions inside the children of children of children... you get it.

So, we need to recursively find all transitionIds and add them to the state object for every frame.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.