Coder Social home page Coder Social logo

geoffchan23 / json-to-figma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pavellaptev/json-to-figma

0.0 0.0 0.0 6.11 MB

An easy way to populate Figma layers with JSON

License: MIT License

JavaScript 3.86% TypeScript 78.25% HTML 0.06% SCSS 17.83%

json-to-figma's Introduction

JSON to Figma (Not Maintained)

Notice: This plugin is no longer maintained

Thank you for your interest in the JSON to Figma plugin. As of now, this plugin has become a paid plugin available on the Figma Community. Due to this change, this repository will no longer be updated.


An easy way to use real data in Figma.

The plugin can parse local or JSON files from a URL link. You can populate any layers with text or images.


Get the plugin


πŸ’‘ Features:

  • Load local files and fetch from URL
  • Fetch images
  • Supported image formats: JPG, PNG, GIF, WEBP, SVG
  • Parsing JSON files with any amount of nested levels
  • Flexible keys selection
  • Invert selected keys
  • Populate in random order
  • Select any ranges from JSON file
  • the "skip" rule for layers you won't populate
  • Handle null values

Youtube demo


πŸš€ How to Use

All you need is a proper JSON. The plugin will parse show all available keys from the JSON including nested layers.

  1. Load a JSON file localy or copy a link and the click on the "From Cipboard link" button.
  2. Make sure layers you want to populate have the same names as in the JSON file. For example β€” if you see a key "user.name" key in the plugin the layer name also should be "user.name".
  3. Select layers with items you want to populate. You can select group or frames with these layers, no need to select layers dirictly or manualy, the plugin will find them by their names.
  4. Select keys you want to use for population.
  5. Press "Populate selected" button

🀘 Features

Range seection β€” If you want to select a certain range from a JSON, you can do it like this β€œ1-10”, β€œ1, 5, 20”, or combine them β€œ1-10, 21, 50-340” β€” it means that the plugin will take JSON objects from 1 to 10, 21 and from 50 to 340 and combine them into one new array. Then you can also save filtered array.

Skip marked layers β€” if you want to skip layers, groups or frames β€” exclude them from the list, then you can use the β€œSkip marked layers” option. Just select layers and press β€œSkip selected”. You can also clean marked layers or add the marker manually.

Random order β€” If you switch it on all items will be filled in a random order. By default, all your layers will be filled in order.

Image URLs recognition β€” The plugin will automaticly recognise values from a JSON that end with .JPG, .PNG, .GIF or .WEBP as images. if you name a shape or a frame with the name of the key β€” the pllugin wil fetch the image by URL and add it as a fill.


βœ… Valid JSON structure

The JSON structure for the file should look like an array of objects.

[
    {
        "id": 1,
        "name": "Shannah Judgkins",
        "job": "Database Administrator II",
        "image": "https://robohash.org/suntautvoluptatem.jpg?size=500x500&set=set1"
    },
    {
        "id": 2,
        "name": "Silvester Hallwell",
        "job": "Data Coordiator",
        "image": "https://robohash.org/rerumautemenim.jpg?size=500x500&set=set1"
    }
]

πŸ““ Services to generate JSON data

You can download try different JSON samples from this repo.

Or you can use on of these services:

json-to-figma's People

Contributors

pavellaptev avatar dependabot[bot] avatar tomresing avatar lukaharambasic avatar 4aficiona2 avatar

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.