-
Notifications
You must be signed in to change notification settings - Fork 2
Figma API Wrapper for Framer
Davo Galavotti edited this page Mar 26, 2018
·
2 revisions
Purpose: This demo aims to show how to fetch content from a Figma File.
-
requestFigmaFilethis will fetch all the Canvas objects from the file url & loop to get the IDs for each Canvas. -
requestFigmaImagethis function will fetch an image from a canvas ID. -
addToFigmaImageObject(WIP) this function will append the response from requestFigmaImage() and it will create a new Figma Image Layer. -
loadImageFromFigmaCDN(WIP) this function will create a new Figma Image Layer and it will preload the image into the session cache. -
setImageInFigmaImageLayer(WIP) this function include the image into the already created Figma Image Layer and it will push the Image Layer into the Page Component.
1. Open the secret.coffee in /modules and add your own Figma Personal Token
exports.token = 'ai3-57wg5gbhe9-cspl-gclno-deheq-1qfrpxq6ax7x'
exports.fileurl = 'https://www.figma.com/file/FileKey/YourFile'- [Figma Web API](https://www.figma.com/developers)
- [Figma API Documentation](https://www.figma.com/developers/docs)
- [Figma API Global Props](https://www.figma.com/developers/docs#global-properties)