Skip to main content

Version 1, Update 67

This update adds two parameters for the "NODE" prototyping Action:

  • resetScrollPosition: Whether to reset the scroll position of any scrollable elements. The parameter only applies if the current node and the destination have the same layout.
  • resetInteractiveComponents: Whether to reset the state of any interactive components. The parameter only applies if the destination has interactive components.

Use the parameters to manage the scroll behavior and component state of nodes in your prototype.

The resetScrollPosition parameter replaces preserveScrollPosition, which remains supported only for backwards compatibility. Instead of preserveScrollPosition, if you want to preserve the current scroll position in the prototype, set resetScrollPosition to false.

For more information about the parameters and state management for prototypes, see:

Version 1, Update 66

This update introduces the optional networkAccess key to the plugin manifest.

Add the networkAccess to your plugin's manifest.json file to specify the domains that your plugin is permitted to access. When networkAccess is applied, if your plugin makes a network request to a domain that is not specified in the list of permitted domains, that request is blocked.

For example:

{
"name": "MyPlugin",
"id": "737805260747778092",
"api": "1.0.0",
"main": "code.js",
"ui": "ui.html",
"networkAccess": {
"allowedDomains": ["https://my-app.cdn.com", "wss://socket.io", "*.example.com", "example.com/api/", "exact-path.com/content"]
}
}

When you publish your plugin, the list of domains that you specify for networkAccess is displayed on your plugin's Community page. This information is also visible for org admins when plugins are reviewed for approval.

To try this out:

  1. In the manifest.json file for your plugin, add the following:
    "networkAccess": {
    "allowedDomains": ["none"]
    }

none is a special keyword for allowedDomains that prevents any network access from your plugin. 2. In Figma, create a new Figma or FigJam file and add your plugin. Try to use the plugin as normal. 3. Check the developer console. If your plugin makes network requests, such as calls to an API or fetching images, Figma blocks the requests and throws content-security policy (CSP) errors. 4. To fix the CSP errors, in your plugin manifest, replace ["none"] with the domains that your plugin needs to access.

For more information about network access, see:

Version 1, Update 63

We now have plugin support for the text improvements launched with Little Big Updates!

New:

Version 1, Update 61

Following up on the new video functionality recently added for prototyping, we have added some updates to our video plugin APIs, which include:

Version 1, Update 60

As part of our launch to allow creators to sell resources directly on Figma Community, we're releasing a Payments API. This API will allow you to create custom time or usage-based free trials for plugins and widgets.

You can use this API to:

  • Read metadata about a user’s payment status and usage of your resource
  • Kick off a checkout flow so a user can pay for your resource

For more information on requiring payment in your plugins and widgets, please read this guide.

Version 1, Update 58

New:

  • New method createImageAsync to create an image from a url string.
  • Add new field consumers to BaseStyle, which refers to the field where the style is applied.

Updates to fetch:

  • Add headers property to fetch request.
  • Add json method to fetch response.
  • body can now take a string.