Converts any Figma layer to Plugin API compatible code and avoids the need to code visual assets manually when developing plugins.
Generating source code
- Select one or more (ideally top level) layers/nodes
- Run
Plugins > Node Decoder
- Copy the generated source code
Features
- Generates most of the source code needed to create, frames, shapes, vectors, text, groups, boolean operations, components and component sets
- Provides syntax highlighted code which you can copy to use in your own plugin
- Detects when text layers are present and provides a function for loading fonts before setting text properties
- Automatically creates components needed for selection if not selected by the user
- Automatically creates paint, effect, grid and text styles if used by nodes
Known limitations
- Selection should ideally be made at the top level
- Properties for instances with overrides are not generated yet
- Doesn’t support images yet
- Some frames which use Auto Layout may be slightly off because of when properties are applied
If you encounter any issues or have any feedback, please raise an issue at https://github.com/limitlessloop/figma-node-decoder