Figma Plugins

Figma Plugins

  • Introduction
  • API Reference
  • Updates

›Recent Posts

Recent Posts

  • Version 1, Update 47
  • Version 1, Update 46
  • Version 1, Update 45
  • Version 1, Update 44
  • Version 1, Update 43

Version 1, Update 47

May 10, 2022

New:

  • New themeColors option in figma.showUI() to allow plugin UIs to support light and dark themes

Version 1, Update 46

May 4, 2022

New:

  • Added new API method setWidgetSyncedState on widget nodes
  • Added new API method findWidgetNodesByWidgetId to find all widget nodes by a specified node.widgetId

Version 1, Update 45

April 27, 2022

New:

  • Added new CIRCLE_FILLED option to the ConnectorStrokeCap type.

Version 1, Update 44

April 6, 2022

New:

  • New .stuckNodes and .stuckTo properties to read the nodes that are stuck on the reference node as well as the node current stuck to.
    • .stuckNodes is available on all SceneNode
    • .stuckTo is only available on “stickable” nodes (eg. StampNode, WidgetNode, HighlightNode)
  • Added typings for HighlightNode and WashiTapeNode.

Version 1, Update 43

March 2, 2022

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

January 26, 2022

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

January 12, 2022

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:
    • node.getPluginDataKeys() Allows enumeration of plugin-data stored on a node
    • node.getSharedPluginDataKeys(namespace) Allows enumeration of shared plugin-data stored on a node in a given namespace
  • Style objects now support all plugin-data functionality
  • New functionality for the clientStorage API
    • deleteAsync allows deleting stored data
    • keysAsync allows enumerating all stored data
  • node.getRelaunchData allows reading what relaunch data was stored using node.setRelaunchData

Version 1, Update 40

December 15, 2021

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.

Version 1, Update 39

November 11, 2021

NOTE: These APIs is only available in FigJam

New:

  • Added getPluginData, setPluginData and other pluginData related methods on WidgetNode
  • Added exportSettings and exportAsync on WidgetNode
  • Added CodeBlockNode type. Create a code block with figma.createCodeBlock

Version 1, Update 38

November 3, 2021

New:

  • Added absoluteRenderBounds property for nodes to calculate the actual bounds of a node accounting for drop shadows, thick strokes, and anything else that may fall outside the node's regular bounding box defined in x, y, width, and height.
  • Added fillGeometry and strokeGeometry properties for nodes with shapes (VectorNode, PolygonNode, etc...) to expose paths for object fills and strokes.

Bug Fixes:

  • Fix bug in figma.showUI that allowed plugins to open very small modals hiding the plugin icon and close button. The new minimum dimensions for the plugin UI is 70x0.
Next →
Learn more about Figma