Skip to main content

Version 1, Update 49

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.

Version 1, Update 48

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:

Version 1, Update 43

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.

Version 1, Update 42

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

Version 1, Update 41

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

Version 1, Update 40

New:

  • Updated WidgetNode.cloneWidget to support overriding synced maps.
  • Added WidgetNode.widgetId to provide a way to tell if a widget node belongs to your widget.
  • Added figma.pluginId and figma.widgetId for Plugins and Widgets respectively to get the value of the manifest.json "id" field at runtime. This is useful when paired with various WidgetNode apis as well as working with non-null origin iframes.
  • Updated figma.showUI to allow iframes to be positioned within the canvas at a specified x/y coordinate. If the position specified is outside of the user's viewport, the iframe will be moved so that it remains in the user's viewport.
  • Added createLinkPreviewAsync which allows Plugin authors to create a link preview from the provided URL.
  • Added EmbedNode and LinkUnfurlNode which represent link previews
  • Add support for drop events in figma.on as a proposed API. Drop events will trigger when objects outside Figma (such as elements from other browser windows, or files from the local filesystem) are dropped onto the canvas.