Is it possible to request /proto

Hello I am looking to make design tokens from a figma proto, e…g /proto/FILEID

Is this possible?

Many thanks

  • Aaron

Can you explain how and why you want to make design tokens from the prototype, and why not from the file? You can only get information from the file, which includes all prototyping connections as well, so I don’t see what you would even be getting from the prototype.

Hello, thanks for the reply.

I’m in an exploratory phase on how we can implement motion to our design system. Currently, from Figma we extract typography, colouring, borders and elevation data to create tokens.

For animation, my hope was to extract information from the /proto links to convert to tokens, e.g.

‘login-error–animation-direction’] = ‘left’;
‘login-error–animation-name’] = ‘Slide’;
‘login-error–animation-duration’] = 3000;

Are you suggesting I should look directly at the designer’s source files, and not Figma?

All the prototyping information such as you described is available in the file data.

Search for “proto” in the docs: https://www.figma.com/developers/api#node-types

HI @Gleb. I don’t see “proto” under https://www.figma.com/developers/api#node-types(https://www.figma.com/developers/api#node-types).



Thank you for the response, that looks perfect, I’ll investigate further.

Thanks again

@Gleb that’s good, but how come it doesn’t say things like the event (if it’s click event, or hover, etc) and the type of the transtion (i.e. navigate to, change to, etc)?
Is there any way to get that info?

Thanks!

Hello!
Figma files can have multiple reactions from a node, but the web api returns only the first one (transitionNodeID property).
Do you have any plans to implement this feature on your web api (returning an array instead of a string on the transitionNodeID property) ?

Thank you!

1 Like