Skip to main content

Version 1, Update 83

Updates:

  • Plugins can now view and set explicit modes for each variable collection on PageNodes.
  • The BaseStyle type is now defined as a union of all possible derived style interfaces, such as PaintStyle and GridStyle. This allows you to use type narrowing on the the type property to go from an instance of BaseStyle to a child style type.
  • Updated the color token values in the CSS Variables and Theming page for the “Figma Design: Light” and “Figma Design: Dark” modes to reflect recent formatting changes to token values injected into the plugin iframe (rgba() values were changed to #rrggbbaa format).
  • Variables can now be bound to Effect and Layout Grid styles. On a selection, variables bound to a given style are populated in boundVariables keyed by style type (effects or layoutGrids).

Version 1, Update 82

This update includes changes to the Variables API to support binding variables to effects, layout grids, stroke weights, and layer opacity. We are also releasing support to run Dev Mode plugins in the Figma for VS Code extension.

Changes to the Variables API:

Dev Mode plugins can now run in the Figma for VS Code extension with some minor manifest and code changes:

Fixes:

Version 1, Update 81

New:

  • We are introducing NEGATE as a Prototyping ExpressionFunction type!

Version 1, Update 80

New:

  • Plugins are now able to explicitly unbind variables from nodes. See setBoundVariable.
  • variableIds are now returned in a similar order to the Figma Design UI. See VariableCollection#variableIds
  • Adds ability to set and query pluginData on Variable and Variable Collection nodes.
  • Adds textRangeFills to the boundVariables structure. This will be populated on text nodes which have color variables bound to substrings.
  • Plugins/widgets that touch straight connectors and set endpoint magnets other than CENTER or NONE will now error in development. Please update your code to use the CENTER or NONE magnets for straight connectors before 2024. See Version 1, Update 79 for more details.
  • Added support for the devStatus field on Frames, Components, Component Sets, and Instances.

Updates for 2023-10-18

The Plugin API runtime has been updated to ensure proper usage of figma.showUI.

It is unsafe to call figma.showUI within an event handler for the figma.codegen.on("generate") event. In development, figma.showUI will now throw an error when called as a result of a figma.codegen.on("generate")

If you need to trigger code inside an iframe as the result of a generate callback, you should instead move the call to showUI outside of the event handler and use figma.ui.postMessage to communicate with the iframe from within the callback. This will ensure that your plugin can to handle concurrent generate events. Here's a code example for how to do this.

Version 1, Update 79

We're introducing an improved way to attach straight connectors to nodes in FigJam with a new CENTER magnet. Starting in 2024, straight connectors will only be able to attach to CENTER and NONE magnets. The magnets for elbowed connectors will remain unchanged.

Notice of breaking change:

caution

To support CENTER magnets as the improved way for straight connectors to attach to nodes, we are making a breaking change for plugins that set straight connector endpoint magnets to AUTO, TOP, LEFT, BOTTOM, or RIGHT.

Who is affected: Anyone with a plugin/widget that touches straight connectors and sets an endpoint magnet to AUTO, TOP, LEFT, BOTTOM, or RIGHT.

What you must do: Find and update the code that sets the endpoints of straight connectors to use the CENTER or NONE magnet.

What will happen now:

  • In-development plugins/widgets will see a non-blocking warning if a magnet other than CENTER or NONE is set for a straight connector.

What will happen starting October 25, 2023:

  • In-development plugins/widgets will always throw an error if a magnet other than CENTER or NONE is set for a straight connector.

What will happen in 2024:

  • Published plugins/widgets will always throw an error if a magnet other than CENTER or NONE is set for a straight connector.

Version 1, Update 77

New:

  • Add detachedInfo to detached instances to indicate if a node is detached from the main component, and to identify its original main component.
  • Add figma.constants.colors, which maps color palette names to ColorPalette. We provide figJamBase and figJamBaseLight, a set of official FigJam colors.
  • Each Reaction object has an actions array replacing the existing action property for executing multiple actions on the same trigger
  • The Action object supports two new action types:

See the reactions property page for more details and code samples.

Notice of breaking change:

caution

To support multiple actions per trigger in the Reaction object, we are making a breaking change for plugins that set the reactions property.

Who is affected: Anyone with a plugin/widget with code that sets the reactions property.

What you must do: Check and update your code to use the new actions property in each Reaction object.

What will happen now:

  • In-development plugins/widgets that set reactions with only the action object without the new actions array will always throw an error. This is to prevent data loss on nodes that already have reactions with multiple actions.
  • Code that sets reactions with both action and actions are fine. actions will take precedence and action will be ignored.

What will happen starting November 9:

  • Published plugins/widgets will always throw an error if the actions array is not present when setting reactions.

Version 1, Update 76

This update fixes a bug with the optional networkAccess key in the plugin manifest. Previously, we had an error where we would treat local worker scripts as well as blob: URLs as external resources. If you were affected by this, you can now update your networkAccess field.

New:

  • Figma will now return inferred variables when there are variables in the file that match the raw values used in your design.
  • Add openTypeFeatures property for text nodes to expose OpenType features that have been explicitly enabled or disabled.