Skip to main content

Released -

New

Bug fixes

Previously, stuckNodes were not marked readonly in the typings. It was a runtime error to try to set this property, and the typings now reflect this.

Breaking interface rename

LayerSublayerNode has been renamed to LabelSublayerNode. The previous name was a typo.


Released -

This release adds support for the component properties feature with new properties and functions on each of the following node types:

ComponentSetNode

ComponentNode (non-variants only)

SceneNode (must be a component sublayer and not nested within an instance node)

InstanceNode

The setProperties function on InstanceNode was also updated to work with component properties.

The variantGroupProperties property on ComponentSetNode is now deprecated. It will continue to the return the variant group properties but it is recommended to use the new componentPropertyDefinitions property.

The variantProperties property will continue to be supported on ComponentNode but is now deprecated on InstanceNodes. It will continue to return the variant properties on an instance but it is now recommended to the use the new componentProperties property.


Released -

This release adds support for the individual strokes feature with new properties for each side of a rectangle or frame-like node:

Assigning a value to the strokeWeight property will apply the same weight to all four sides.

caution

⚠️ strokeWeight may return a stale value if the node is using individual stroke weights. In the near future, we will be changing this to return figma.mixed but are leaving it as an inaccurate number for now. If you want accurate stroke widths, please use the new properties above going forward.

New:

  • Support for individual strokes
  • Added figma.ungroup for ungrouping nodes, which is roughly equivalent to Ctrl-Shift-G/⌘⇧G in the editor.
  • Added new autolayout properties:
    • layoutPositioning: Determines whether a layer's size and position should be determined by auto-layout settings or manually adjustable
    • strokesIncludedInLayout: Determines whether strokes are included in layout calculations
    • itemReverseZIndex: Determines the canvas stacking order of layers in this frame
  • Updated autolayout properties:
    • counterAxisAlignItems: Added "BASELINE" option for aligning all children along the text baseline on horizontal auto-layout frames.
    • textAutoResize: Added "TRUNCATE" option for truncating overflowing text with an ellipse.

Fixes to the plugin typings:


Released -

New:

  • VectorRegions inside a VectorNetwork now have new fills and fillStyleId properties to let you get and set unique fills for each region in a vector network.

Released -

New:

  • Added node.getStyledTextSegments for text nodes to make it much faster and easier to get text properties which may have mixed values, along with which characters these values apply to. Compared to retrieving text properties character-by-character, this new function can be 10x to 500x faster.
  • Drop events in figma.on are now officially supported (was previously a proposed API). This new API allows you to register a callback for drop events, which will trigger when objects outside Figma (such as elements from other browser windows, or files from the local filesystem) are dropped onto the canvas.
  • Added prototypeBackgrounds property to PageNode for configuring the background color of the prototype.
  • Added figma.getFileThumbnailNode() and figma.setFileThumbnailNodeAsync(node) to get and set the thumbnail node for the current file.
  • Added figma.base64Encode and figma.base64Decode to convert between base64-encoded strings and Uint8Arrays

Released -

New:

  • Added figma.skipInvisibleInstanceChildren to make all node properties and methods skip over invisible nodes (and their descendants) inside instances. This can make operations like document traversal much faster.
  • Added node.findAllWithCriteria for much faster document traversal when searching by node types. The return value is narrowly typed to match the provided types, which makes it much easier to use node-type-specific properties. For example, node.findAllWithCriteria({ types: ['TEXT'] }) will return TextNode[] instead of the more generic SceneNode[] from findAll.
  • Added ability to enumerate plugin-data stored on a node:
  • Style objects now support all plugin-data functionality
  • New functionality for the clientStorage API
  • node.getRelaunchData allows reading what relaunch data was stored using node.setRelaunchData