Questions tagged [figma-api]

Figma is a tool for prototyping and collaborating on design in the comfort of your browser.

Figma offers an API to integrate with its collaborative platform - https://www.figma.com/developers

49 questions
0
votes
0 answers

Programmatically render the getters of a JavaScript object

I'm desperately looking to render this object programmatically, so I can work with it with handlebars.js, when I try to pass a property as it is of now, I do get an error about the fact that handlebars can process only "own" properties. The object…
0
votes
0 answers

Is there any limitation for uploading image from Figma Plugin to my server?

I want to build a plugin to allow designers to upload image that they added to the frame with the frame specification etc. I'm seeing some comments/questions on Figma Community pages mentioned that figma doesn't allow that type of network requests…
Mert Serin
  • 289
  • 6
  • 20
0
votes
0 answers

I cannot get npm run dev to run i've tried looking it up and even tried using a fix from comment section?

i'm following figma widget creation video from office hours playlist but i can't use the npm run dev command i've tried using a the suggested change by using "" everywhere but i can't get it to work here's my error PS C:\Users***\Desktop\figma> npm…
Salil
  • 19
  • 3
0
votes
0 answers

How can I find all groups in a page that have the same name?

I’m building my first Figma plugin, and before I can build the next functionality into my plugin, I first need to: Find all the groups that have the same name Club the ones with the same name and show them to the user (For example, 2 groups with…
0
votes
0 answers

figma API relativeTransformArray

const doc = { width: 300, height: 600, children: [ { type: "RECTANGLE", x: 100, y: 100, width: 100, height: 100, fill: "red" }, { type: "RECTANGLE", x: 100, y: 400, width: 100, height: 100, fill:…
user3094755
  • 1,561
  • 16
  • 20
0
votes
1 answer

How to get the CSS selector code in Figma?

I have received a component library. I have to use its CSS for the relevant components in our webb-app. I go to "checkbox". I right-click on it and choose "copy as CSS". The CSS for all the states of a checkbox is then copied. But it is just the CSS…
0
votes
0 answers

Unable to follow AWS documentation to dynamically query a collection

I'm trying to follow the AWS documentation for UI development with Figma. Unfortunately I reach a point where the instructions no longer tally with what I'm seeing in my console. The image where the docs show "Link Collection To Data Model", on the…
JimmyTheCode
  • 3,783
  • 7
  • 29
  • 71
0
votes
1 answer

Set focus in Figma plugin programmatically

I'm wondering on how to set the focus of the browser into the opened plugin window of a Figma plugin. I'm running React in this plugin. Tried different approaches so far but does anyone know on how to do it the right way? For context: I want to…
Felix Haeberle
  • 1,530
  • 12
  • 19
0
votes
1 answer

FIGMA- What is the shortcut keyboard button for adding stroke to a Line?

FIGMA- What is the shortcut keyboard button for adding stroke to a Line? How can we do that?
0
votes
1 answer

Generated Figma plugin does not include TS typings

I'm trying to follow along with the plugin setup guide found here and I have a very, very simple plugin that looks like this: figma.showUI(__html__); // @ts-ignore console.log(figma.currentPage.selection[0].cornerRadius); Exactly as written, the…
crowhill
  • 2,398
  • 3
  • 26
  • 55
0
votes
2 answers

Convert figma file to image format

I want to let user upload figma file and diplay those figma files as images in React application. use case: User can upload his/her design as figma files and display as images Can i do this task?
ELBEQQAL
  • 36
  • 2
  • 5
0
votes
1 answer

Figma access master components

Is there a way to traverse through masterComponents without having an instance in the document first? Also, will a component's UUID change when the component is updated, and will that UUID be the same across all consumers of that component?
0
votes
0 answers

Figma plugin access installed components

Is there a way to tap into installed components (not just components used in the document)? For instance, if I have an alert component, and I want my plugin to generate an alert component in the document, how would I retrieve a component listed in…
0
votes
1 answer

How to get the original image file type (png, jpg, etc.) of an image?

I am trying to export images used in layers. The image fills API (GET/v1/files/:key/images) returns a map of [ imageRef , URL ] but there's no way to know the image file type. For example, the URL doesn't have the file type. This is kind of a show…
Don Box
  • 3,166
  • 3
  • 26
  • 55
0
votes
1 answer

Given the X, Y, width and, height variables How do I find the start and end values of a shape in Google App Script?

So I was able to grab the width, hight, X, and y value of a frame in Figma. However, Google App Script is asking for start and the end of the the index of the shape in Google App script. how do I manipulate the values of X and Y to get the start and…