Node Decoder
Generate plugin and widget source code based on Figma designs
Plugin Preview
About this plugin
Node Decoder generates plugin or widget source code from any Figma design as Javascript and JSX. Useful for avoiding the need to code visual assets manually when developing plugins.
Generating source code
- Select one or more (ideally top level) layers/nodes
- Run the command
Node Decoder
- Copy the generated source code
- Click the toggle to flip between plugin and widget code.
Previewing code
- Press the play icon to run the currently generated code
Plugin code
- Selection should ideally be made at the top level
- Doesn't support checking for custom fonts yet
- Doesn't support images yet
- Some frames which use Auto Layout may be slightly off because of when properties are applied
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
- Intelligently generates overrides for instance nodes
Widget code
- Vectors should be in frames and have an export setting of SVG.
- It's better to use frames than groups (for now)
- Doesn't support images yet
- Some nodes do not exist as React components are not supported in widget code
If you encounter any issues or have any feedback, please raise an issue at https://github.com/limitlessloop/figma-node-decoder
JavaScript API (Alpha)
An alpha version of a JavaScript API is now available to try in your own plugins. Convert any node to a string that can be recreated later.
https://github.com/limitlessloop/figma-node-decoder/tree/javascript-api
Plugin Details
Version | 30 |
---|---|
Created | January 19, 2021 |
Last Updated | August 28, 2023 |
Category | Software development |
Creator | Gavin McFarland |
Stats | 765 installs, 130 likes |
Pricing | Free |
Technical Details
- API:1.0.0
- UI:{"main": "index.html"}
- main:code.js
- Editor Types:figma
- Allowed Domains:
- none
More Like This
Discover other plugins in the Software development category.
Figma to Code (HTML, Tailwind, Flutter, SwiftUI)
Code Conversion Made Easy: Figma to Web & Apps
Anima - Figma to Code React, HTML, CSS, Tailwind, MUI (DevMode Inspect React / HTML / Vue / CSS)
Anima - AI Powered Design to code
Builder.io - AI-Powered Figma to Code (React, Vue, Tailwind, & more)
Export designs to responsive code (React, HTML, Vue, Tailwind, etc) with AI