Skip to main content

Version 1, Update 26

New:

  • Added getRangeListOptions, setRangeListOptions, getRangeIndentation, setRangeIndentation to TextNode to allow for creation of ordered/unordered lists and to adjust indentation levels

Version 1, Update 22

New:

  • Added swapComponent to swap an instance's main component to a different main component. This function preserves overrrides using the same heuristics as instance swap in the Figma editor UI.

Version 1, Update 21

New:

  • Added commitUndo to commit new undo states to undo history. This does not trigger an undo.
  • Added triggerUndo to trigger an undo action. This reverts to the last state in undo history.

Version 1, Update 20

New:

  • Added moveLocalPaintStyleAfter, moveLocalTextStyleAfter, moveLocalEffectStyleAfter, and moveLocalGridStyleAfter to reorder local styles within folders.
  • Added moveLocalPaintFolderAfter, moveLocalTextFolderAfter, moveLocalEffectFolderAfter, and moveLocalGridFolderAfter to reorder style folders that share the same parent folder.

Version 1, Update 19

New:

  • Support for the new autolayout APIs! They are available on frame nodes.
  • The primaryAxisSizingMode, primaryAxisAlignItems, counterAxisAlignItems properties have been added on frame-like nodes.
  • The horizontalPadding and verticalPadding properties are now deprecated. Use paddingLeft, paddingRight, paddingTop and paddingBottom instead.
  • The layoutGrow property has been added on all nodes (except documents & page nodes).
  • The layoutAlign has changed. It now supports the values "STRETCH" | "INHERIT".

Fixed:

  • The getPluginData and getSharedPluginData APIs now properly inherit from components when accessed from an instance.
  • The setRelaunchData APIs is now able to override relaunch data on instances.

Version 1, Update 18

New:

Fixed:

  • Fixed a bug where instance.children would not return any children when the instance was invisible
  • Fixed a bug where setting a local style to private (by prepending _ to the style name) did not stop it from being published
  • Fixed a bug where accessing textNode.textAutoResize would crash
  • Fixed a bug where it was possible to give a node invalid coordinates by setting relativeTransform to some value where the two axes had zero dot product
  • Fixed a bug where components imported from the team library became writeable
  • Fixed a bug where figma.getLocal*Styles() would return an array containing null or invalid style nodes

Version 1, Update 17

New:

  • enablePrivatePluginApi option in manifest.json to enable Private Plugin specific APIs
  • For private plugins with the above option set, figma.fileKey will be set to the key of the current file.
  • The ui property in the plugin manifest can now either contain a filename in the form of a string. Or a list of filenames in the form of a map.
// either
"ui": "ui.html"

// or
"ui": {
"loginPage": "login.html",
"main": "ui.html",
}
  • If you use the former, the file is available through the __html__ property. If you use the latter, then the files are available through a new __uiFiles__ property (eg.__uiFiles__.loginPage, __uiFiles__.main etc)

Fixed:

  • InstanceNode.mainComponent now returns null instead of raising an exception if the underlying component doesn't actually exist.
  • setPluginData and setSharedPluginData now removes the the relevant entries when the value is set to the empty string "", which is the default value returned by getPluginData and getSharedPluginData.