Plugin API coverage

Which members of the Figma Plugin API the figma global of use_figma supports, member by member.

Generated from the coverage table of src/plugin-api by scripts/docs-cli.mjs; ud plugin-api prints the same table. A use_figma script runs in a QuickJS sandbox with a Figma Plugin API compatible figma global (CLI-001 §4); every member below maps to a registry command, so a script edits the design exactly as the editor does.

Status Members
supported 568
partial 21
planned 38
not planned 45
total 672

supported: behaves as in Figma. partial: works with the limits in the notes. planned: a later milestone (since). not planned: throws a clear error naming the member.

SceneNode#

Member Kind Status Since Command Notes
id property supported 0.1 the native id (nd-…)
type property supported 0.1
removed property supported 0.1
name property supported 0.1 node.rename
visible property supported 0.1 appearance.set
locked property supported 0.1 node.update
parent property supported 0.1
x property supported 0.1 node.move
y property supported 0.1 node.move
width property supported 0.1 derived (auto layout, hug, fill, text); use resize()
height property supported 0.1 derived (auto layout, hug, fill, text); use resize()
rotation property supported 0.1 node.update
opacity property supported 0.1 appearance.set
blendMode property supported 0.1 appearance.set
cornerRadius property supported 0.1 appearance.set
clipsContent property supported 0.1 appearance.set
fills property supported 0.1 fill.set frozen clone on read
strokes property supported 0.1 stroke.set frozen clone on read
strokeWeight property supported 0.1 stroke.set
strokeAlign property supported 0.1 stroke.set
constraints property supported 0.1 node.update
description property supported 0.1 node.update
absoluteBoundingBox property supported 0.1 the layout engine’s page box (rotation included)
absoluteRenderBounds property supported 0.3 strokes and effects (shadows, blurs) included
absoluteTransform property supported 0.1
relativeTransform property partial 0.1 read only; position derived by the layout engine
layoutSizingHorizontal property supported 0.3 layout.setSizing
layoutSizingVertical property supported 0.3 layout.setSizing
layoutGrow property supported 0.3 layout.setSizing 1 ↔ FILL on the parent’s main axis
layoutAlign property supported 0.3 layout.setSizing STRETCH ↔ FILL on the parent’s counter axis; MIN/CENTER/MAX read as INHERIT
layoutPositioning property supported 0.3 layout.setPositioning
minWidth property supported 0.3 layout.setSizing
maxWidth property supported 0.3 layout.setSizing
minHeight property supported 0.3 layout.setSizing
maxHeight property supported 0.3 layout.setSizing
gridRowAnchorIndex property supported 0.3 the cell taken (auto-placed ones too); set with setGridChildPosition
gridColumnAnchorIndex property supported 0.3 the cell taken; set with setGridChildPosition
gridRowSpan property supported 0.3 grid.place
gridColumnSpan property supported 0.3 grid.place
gridChildHorizontalAlign property supported 0.3 grid.place
gridChildVerticalAlign property supported 0.3 grid.place
setGridChildPosition method supported 0.3 grid.place
resize method supported 0.1 node.resize
resizeWithoutConstraints method supported 0.1 node.resize children keep their place (node.resize –ignoreConstraints)
appendChild method supported 0.1 node.reparent
insertChild method supported 0.1 node.reparent
remove method supported 0.1 node.delete
clone method supported 0.1 node.duplicate
query method supported 0.1 ud extra: a selector scoped to the node
set method supported 0.1 ud extra: assigns every property of the object
placeholder method supported 0.1 fill.set ud extra: grey placeholder fill, flagged in plugin data until cleared
findAll method supported 0.1 predicate runs in the sandbox over a host snapshot
findOne method supported 0.1
findChild method supported 0.1
findChildren method supported 0.1
findAllWithCriteria method supported 0.1 types only at 0.1
findWidgetNodesByWidgetId method supported 0.1 always []
toString method supported 0.1
children property supported 0.1
getPluginData method supported 0.1
setPluginData method supported 0.1 node.update
getPluginDataKeys method supported 0.1
getSharedPluginData method supported 0.1
setSharedPluginData method supported 0.1 node.update
getSharedPluginDataKeys method supported 0.1
setRelaunchData method supported 0.1 accepted and ignored
getRelaunchData method supported 0.1
strokeCap property supported 0.1 stroke.set
strokeJoin property supported 0.1 stroke.set
strokeMiterLimit property supported 0.1 stroke.set
dashPattern property supported 0.1 stroke.set
strokeTopWeight property supported 0.2 stroke.set frames and rectangles
strokeRightWeight property supported 0.2 stroke.set frames and rectangles
strokeBottomWeight property supported 0.2 stroke.set frames and rectangles
strokeLeftWeight property supported 0.2 stroke.set frames and rectangles
topLeftRadius property supported 0.1 appearance.set
topRightRadius property supported 0.1 appearance.set
bottomLeftRadius property supported 0.1 appearance.set
bottomRightRadius property supported 0.1 appearance.set
cornerSmoothing property supported 0.1 appearance.set
effects property supported 0.1 node.update frozen clone on read; a set replaces the list
isMask property supported 0.1 mask.set
maskType property supported 0.1 mask.set
exportSettings property supported 0.1 export.addSetting frozen; a set replaces the list (export.removeSetting, export.addSetting)
exportAsync method partial 0.2 PNG, JPG, SVG, SVG_STRING and PDF (0.6, one vector page with subset fonts) through the renderer (export.render’s); JSON_REST_V1 is unsupported
screenshot method supported 0.2 figma-use convenience: {png, width, height}, longest edge 1024 by default (as get_screenshot)
rescale method supported 0.2b node.rescale scales size, strokes, effects, radii, text and vector coordinates about the top-left corner (DRW-9)
outlineStroke method supported 0.2b vector.outlineStroke a new VectorNode above the node (which is unchanged), or null without a visible stroke
constrainProportions property planned 0.3
targetAspectRatio property planned 0.3
lockAspectRatio method planned 0.3
unlockAspectRatio method planned 0.3
componentPropertyReferences property supported 0.4 component.bindLayer
boundVariables property supported 0.4
setBoundVariable method supported 0.4 node.bind scopes are not enforced, as in Figma (node.bind –force)
fillStyleId property supported 0.4 style.apply assignment is deprecated in Figma; prefer setFillStyleIdAsync
setFillStyleIdAsync method supported 0.4 style.apply
strokeStyleId property supported 0.4 style.apply assignment is deprecated in Figma; prefer setStrokeStyleIdAsync
setStrokeStyleIdAsync method supported 0.4 style.apply
effectStyleId property supported 0.4 style.apply assignment is deprecated in Figma; prefer setEffectStyleIdAsync
setEffectStyleIdAsync method supported 0.4 style.apply
explicitVariableModes property supported 0.4
resolvedVariableModes property supported 0.4
setExplicitVariableModeForCollection method supported 0.4 node.setMode
clearExplicitVariableModeForCollection method supported 0.4 node.setMode
getTopLevelFrame method supported 0.4
inferredVariables property planned 0.4
reactions property supported 0.5 node.update
setReactionsAsync method supported 0.5 node.update
scrollBehavior property supported 0.5 node.setScroll
attachedConnectors property planned 0.5
annotations property supported 0.6 node.update developer notes with pinned properties and a category (DEV-7)
devStatus property supported 0.6 node.setStatus frames, sections, components and component sets (DEV-5)
descriptionMarkdown property supported 0.6 node.update also sets description to the plain text
documentationLinks property supported 0.6 node.update
getCSSAsync method supported 0.6 codegen.inspect the node’s own CSS (layout, size, fills, borders, radii, shadows, typography); variables as var(–name) (DEV-1)
stuckNodes property planned 0.6
isAsset property planned 0.6
setDevResourcesAsync method not planned
getDevResourcesAsync method not planned
addDevResourceAsync method not planned
editDevResourceAsync method not planned
deleteDevResourceAsync method not planned

FrameNode#

Member Kind Status Since Command Notes
layoutMode property supported 0.3 layout.set children keep their order; turning it off keeps their place
layoutWrap property supported 0.3 layout.set
itemSpacing property supported 0.3 node.update
counterAxisSpacing property supported 0.3 node.update
paddingLeft property supported 0.3 node.update
paddingRight property supported 0.3 node.update
paddingTop property supported 0.3 node.update
paddingBottom property supported 0.3 node.update
primaryAxisAlignItems property supported 0.3 node.update
counterAxisAlignItems property supported 0.3 node.update
counterAxisAlignContent property supported 0.3 node.update
primaryAxisSizingMode property supported 0.3 layout.setSizing AUTO ↔ HUG on the main axis
counterAxisSizingMode property supported 0.3 layout.setSizing AUTO ↔ HUG on the counter axis
itemReverseZIndex property supported 0.3 node.update
strokesIncludedInLayout property supported 0.3 node.update
layoutGrids property supported 0.3 node.update frozen clone on read; a set replaces the list (layout.addGrid/setGrid/removeGrid)
gridRowCount property supported 0.3 grid.set
gridColumnCount property supported 0.3 grid.set
gridRowGap property supported 0.3 grid.set
gridColumnGap property supported 0.3 grid.set
gridRowSizes property supported 0.3 grid.set
gridColumnSizes property supported 0.3 grid.set
setGridRowCount method supported 0.3 grid.set
setGridColumnCount method supported 0.3 grid.set
appendChildAt method supported 0.3 grid.place
inferredAutoLayout property supported 0.3 the frame’s own auto layout, or layout.add’s inference from its children (not applied)
gridStyleId property supported 0.4 style.apply assignment is deprecated in Figma; prefer setGridStyleIdAsync
setGridStyleIdAsync method supported 0.4 style.apply
overflowDirection property supported 0.5 node.setScroll
numberOfFixedChildren property supported 0.5 node.setScroll derived: the trailing children whose scrollBehavior is FIXED
overlayPositionType property supported 0.5 node.setOverlay
overlayBackground property supported 0.5 node.setOverlay
overlayBackgroundInteraction property supported 0.5 node.setOverlay
guides property planned 0.6
detachedInfo property planned 0.4

SectionNode#

Member Kind Status Since Command Notes
sectionContentsHidden property supported 0.1 node.update
devStatus property supported 0.6 node.setStatus frames, sections, components and component sets (DEV-5)

EllipseNode#

Member Kind Status Since Command Notes
arcData property supported 0.1 node.update

PolygonNode#

Member Kind Status Since Command Notes
pointCount property supported 0.1 node.update

StarNode#

Member Kind Status Since Command Notes
pointCount property supported 0.1 node.update
innerRadius property supported 0.1 node.update

TextNode#

Member Kind Status Since Command Notes
characters property supported 0.2 text.set needs loadFontAsync of the node’s fonts; the new text takes the first character’s style
fontName property supported 0.2 text.setFont
fontSize property supported 0.2 text.setFont
fontWeight property supported 0.2 from the style name (Semi Bold → 600)
letterSpacing property supported 0.2 node.update
lineHeight property supported 0.2 node.update
textCase property supported 0.2 node.update
textDecoration property supported 0.2 node.update
hyperlink property supported 0.2 node.update
paragraphSpacing property supported 0.2 text.setParagraph
paragraphIndent property supported 0.2 text.setParagraph
openTypeFeatures property supported 0.2
fills property supported 0.2 fill.set figma.mixed when runs differ; a set replaces the runs’ fills
textAlignHorizontal property supported 0.2 text.align
textAlignVertical property supported 0.2 text.align
textAutoResize property supported 0.2 text.autoResize
textTruncation property supported 0.2 text.autoResize
maxLines property supported 0.2 text.autoResize
listSpacing property supported 0.2 node.update
hangingPunctuation property supported 0.2 node.update
hangingList property supported 0.2 node.update
leadingTrim property supported 0.2 node.update
autoRename property partial 0.2 node.update a layer whose name equals its text follows it (text.set); assignment is accepted and ignored
hasMissingFont property supported 0.2 checked against services.fonts; false without it
insertCharacters method supported 0.2 text.edit
deleteCharacters method supported 0.2 text.edit
getRangeFontSize method supported 0.2
setRangeFontSize method supported 0.2 text.setRange
getRangeFontName method supported 0.2
setRangeFontName method supported 0.2 text.setRange
getRangeAllFontNames method supported 0.2
getRangeFontWeight method supported 0.2
getRangeFills method supported 0.2
setRangeFills method supported 0.2 text.setRange
getRangeTextCase method supported 0.2
setRangeTextCase method supported 0.2 text.setRange
getRangeTextDecoration method supported 0.2
setRangeTextDecoration method supported 0.2 text.setRange
getRangeLetterSpacing method supported 0.2
setRangeLetterSpacing method supported 0.2 text.setRange
getRangeLineHeight method supported 0.2
setRangeLineHeight method supported 0.2 text.setRange
getRangeHyperlink method supported 0.2
setRangeHyperlink method supported 0.2 text.setRange
getRangeOpenTypeFeatures method supported 0.2
getRangeListOptions method supported 0.2
setRangeListOptions method supported 0.2 text.setParagraph
getRangeIndentation method supported 0.2
setRangeIndentation method supported 0.2 text.setParagraph
getStyledTextSegments method supported 0.2
getRangeTextStyleId method planned 0.4
setRangeTextStyleIdAsync method planned 0.4
getRangeFillStyleId method planned 0.4
setRangeFillStyleIdAsync method planned 0.4
getRangeBoundVariable method planned 0.4
setRangeBoundVariable method planned 0.4
textStyleId property supported 0.4 style.apply assignment is deprecated in Figma; prefer setTextStyleIdAsync
setTextStyleIdAsync method supported 0.4 style.apply
textPath property supported 1.2 UI Designer extension (TXT-8); set with ud.setTextPath

VectorNode#

Member Kind Status Since Command Notes
vectorPaths property supported 0.2 vector.setPaths
vectorNetwork property supported 0.2 vector.setNetwork validated (indexes, duplicate segments, closed loops); vectorPaths is derived; the node is re-based on the network’s bounds
setVectorNetworkAsync method supported 0.2 vector.setNetwork as the vectorNetwork setter
handleMirroring property supported 0.2 node.update

BooleanOperationNode#

Member Kind Status Since Command Notes
booleanOperation property supported 0.2 boolean.setOperation live: the kernel computes the result from the children (0.2b)

ComponentNode#

Member Kind Status Since Command Notes
addComponentProperty method supported 0.4 component.addProperty
editComponentProperty method supported 0.4 component.editProperty
deleteComponentProperty method supported 0.4 component.deleteProperty
componentPropertyDefinitions property supported 0.4
key property supported 0.4 the component’s id (qualified for a library component)
remote property supported 0.4
getPublishStatusAsync method supported 0.4 libraries publish by file (VAR-7)
createInstance method supported 0.4 instance.create on the current page at 0,0
instances property supported 0.4
getInstancesAsync method supported 0.4
variantProperties property supported 0.4
layoutMode property supported 0.4 layout.set children keep their order; turning it off keeps their place
layoutWrap property supported 0.4 layout.set
itemSpacing property supported 0.4 node.update
counterAxisSpacing property supported 0.4 node.update
paddingLeft property supported 0.4 node.update
paddingRight property supported 0.4 node.update
paddingTop property supported 0.4 node.update
paddingBottom property supported 0.4 node.update
primaryAxisAlignItems property supported 0.4 node.update
counterAxisAlignItems property supported 0.4 node.update
counterAxisAlignContent property supported 0.4 node.update
primaryAxisSizingMode property supported 0.4 layout.setSizing AUTO ↔ HUG on the main axis
counterAxisSizingMode property supported 0.4 layout.setSizing AUTO ↔ HUG on the counter axis
itemReverseZIndex property supported 0.4 node.update
strokesIncludedInLayout property supported 0.4 node.update
layoutGrids property supported 0.4 node.update frozen clone on read; a set replaces the list (layout.addGrid/setGrid/removeGrid)
gridRowCount property supported 0.4 grid.set
gridColumnCount property supported 0.4 grid.set
gridRowGap property supported 0.4 grid.set
gridColumnGap property supported 0.4 grid.set
gridRowSizes property supported 0.4 grid.set
gridColumnSizes property supported 0.4 grid.set
setGridRowCount method supported 0.4 grid.set
setGridColumnCount method supported 0.4 grid.set
appendChildAt method supported 0.4 grid.place
inferredAutoLayout property supported 0.4 the frame’s own auto layout, or layout.add’s inference from its children (not applied)
overflowDirection property supported 0.5 node.setScroll
numberOfFixedChildren property supported 0.5 node.setScroll derived: the trailing children whose scrollBehavior is FIXED
overlayPositionType property supported 0.5 node.setOverlay
overlayBackground property supported 0.5 node.setOverlay
overlayBackgroundInteraction property supported 0.5 node.setOverlay

ComponentSetNode#

Member Kind Status Since Command Notes
addComponentProperty method supported 0.4 component.addProperty
editComponentProperty method supported 0.4 component.editProperty
deleteComponentProperty method supported 0.4 component.deleteProperty
componentPropertyDefinitions property supported 0.4
key property supported 0.4 the component’s id (qualified for a library component)
remote property supported 0.4
getPublishStatusAsync method supported 0.4 libraries publish by file (VAR-7)
defaultVariant property supported 0.4
variantGroupProperties property supported 0.4
layoutMode property supported 0.4 layout.set children keep their order; turning it off keeps their place
layoutWrap property supported 0.4 layout.set
itemSpacing property supported 0.4 node.update
counterAxisSpacing property supported 0.4 node.update
paddingLeft property supported 0.4 node.update
paddingRight property supported 0.4 node.update
paddingTop property supported 0.4 node.update
paddingBottom property supported 0.4 node.update
primaryAxisAlignItems property supported 0.4 node.update
counterAxisAlignItems property supported 0.4 node.update
counterAxisAlignContent property supported 0.4 node.update
primaryAxisSizingMode property supported 0.4 layout.setSizing AUTO ↔ HUG on the main axis
counterAxisSizingMode property supported 0.4 layout.setSizing AUTO ↔ HUG on the counter axis
itemReverseZIndex property supported 0.4 node.update
strokesIncludedInLayout property supported 0.4 node.update
layoutGrids property supported 0.4 node.update frozen clone on read; a set replaces the list (layout.addGrid/setGrid/removeGrid)
gridRowCount property supported 0.4 grid.set
gridColumnCount property supported 0.4 grid.set
gridRowGap property supported 0.4 grid.set
gridColumnGap property supported 0.4 grid.set
gridRowSizes property supported 0.4 grid.set
gridColumnSizes property supported 0.4 grid.set
setGridRowCount method supported 0.4 grid.set
setGridColumnCount method supported 0.4 grid.set
appendChildAt method supported 0.4 grid.place
inferredAutoLayout property supported 0.4 the frame’s own auto layout, or layout.add’s inference from its children (not applied)
overflowDirection property supported 0.5 node.setScroll
numberOfFixedChildren property supported 0.5 node.setScroll derived: the trailing children whose scrollBehavior is FIXED
overlayPositionType property supported 0.5 node.setOverlay
overlayBackground property supported 0.5 node.setOverlay
overlayBackgroundInteraction property supported 0.5 node.setOverlay

InstanceNode#

Member Kind Status Since Command Notes
mainComponent property supported 0.4 instance.swap null for an instance of a deleted component (its snapshot is not a node)
getMainComponentAsync method supported 0.4
componentProperties property supported 0.4
setProperties method supported 0.4 instance.setProperties
variantProperties property supported 0.4
resetOverrides method supported 0.4 instance.reset
detachInstance method supported 0.4 instance.detach
swapComponent method supported 0.4 instance.swap
overrides property supported 0.4 the instance’s own changed fields and each sublayer’s (dormant overrides left out)
scaleFactor property supported 0.4 scaling instances is not supported; always 1
exposedInstances property supported 0.4 exposing nested instances is not supported; always []
isExposedInstance property supported 0.4
layoutMode property supported 0.4 layout.set children keep their order; turning it off keeps their place
layoutWrap property supported 0.4 layout.set
itemSpacing property supported 0.4 node.update
counterAxisSpacing property supported 0.4 node.update
paddingLeft property supported 0.4 node.update
paddingRight property supported 0.4 node.update
paddingTop property supported 0.4 node.update
paddingBottom property supported 0.4 node.update
primaryAxisAlignItems property supported 0.4 node.update
counterAxisAlignItems property supported 0.4 node.update
counterAxisAlignContent property supported 0.4 node.update
primaryAxisSizingMode property supported 0.4 layout.setSizing AUTO ↔ HUG on the main axis
counterAxisSizingMode property supported 0.4 layout.setSizing AUTO ↔ HUG on the counter axis
itemReverseZIndex property supported 0.4 node.update
strokesIncludedInLayout property supported 0.4 node.update
layoutGrids property supported 0.4 node.update frozen clone on read; a set replaces the list (layout.addGrid/setGrid/removeGrid)
gridRowCount property supported 0.4 grid.set
gridColumnCount property supported 0.4 grid.set
gridRowGap property supported 0.4 grid.set
gridColumnGap property supported 0.4 grid.set
gridRowSizes property supported 0.4 grid.set
gridColumnSizes property supported 0.4 grid.set
setGridRowCount method supported 0.4 grid.set
setGridColumnCount method supported 0.4 grid.set
appendChildAt method supported 0.4 grid.place
inferredAutoLayout property supported 0.4 the frame’s own auto layout, or layout.add’s inference from its children (not applied)
overflowDirection property supported 0.5 node.setScroll
numberOfFixedChildren property supported 0.5 node.setScroll derived: the trailing children whose scrollBehavior is FIXED
overlayPositionType property supported 0.5 node.setOverlay
overlayBackground property supported 0.5 node.setOverlay
overlayBackgroundInteraction property supported 0.5 node.setOverlay

PageNode#

Member Kind Status Since Command Notes
id property supported 0.1
type property supported 0.1
removed property supported 0.1
name property supported 0.1 page.update
parent property supported 0.1
selection property supported 0.1 node.update the script’s selection; a live editor mirrors it
backgrounds property supported 0.1 page.update
appendChild method supported 0.1 node.reparent
insertChild method supported 0.1 node.reparent
remove method supported 0.1 page.delete
loadAsync method supported 0.1 no-op: pages are always loaded
clone method supported 0.1 page.create
findAll method supported 0.1 predicate runs in the sandbox over a host snapshot
findOne method supported 0.1
findChild method supported 0.1
findChildren method supported 0.1
findAllWithCriteria method supported 0.1 types only at 0.1
findWidgetNodesByWidgetId method supported 0.1 always []
toString method supported 0.1
children property supported 0.1
getPluginData method supported 0.1
setPluginData method planned 0.3 page.update and document.update carry no pluginData yet
getPluginDataKeys method supported 0.1
getSharedPluginData method supported 0.1
setSharedPluginData method planned 0.3 page.update and document.update carry no pluginData yet
getSharedPluginDataKeys method supported 0.1
setRelaunchData method supported 0.1 accepted and ignored
getRelaunchData method supported 0.1
flowStartingPoints property supported 0.5 flow.create derived from tree.flows (flow.create, flow.update, flow.delete)
prototypeStartNode property supported 0.5 deprecated in Figma: the first flow’s starting frame
prototypeBackgrounds property planned 0.5
guides property planned 0.6
isPageDivider property planned 0.6
getSharedPluginDataKeysAsync method planned 0.4
on method not planned
once method not planned
off method not planned

DocumentNode#

Member Kind Status Since Command Notes
id property supported 0.1
type property supported 0.1
removed property supported 0.1
name property supported 0.1 document.update
parent property supported 0.1
documentColorProfile property supported 0.1
findAll method supported 0.1 predicate runs in the sandbox over a host snapshot
findOne method supported 0.1
findChild method supported 0.1
findChildren method supported 0.1
findAllWithCriteria method supported 0.1 types only at 0.1
findWidgetNodesByWidgetId method supported 0.1 always []
toString method supported 0.1
children property supported 0.1
getPluginData method supported 0.1
setPluginData method planned 0.3 page.update and document.update carry no pluginData yet
getPluginDataKeys method supported 0.1
getSharedPluginData method supported 0.1
setSharedPluginData method planned 0.3 page.update and document.update carry no pluginData yet
getSharedPluginDataKeys method supported 0.1
setRelaunchData method supported 0.1 accepted and ignored
getRelaunchData method supported 0.1
on method not planned
once method not planned
off method not planned

figma#

Member Kind Status Since Command Notes
currentPage property supported 0.1 setCurrentPageAsync assignment is deprecated in Figma; prefer setCurrentPageAsync
root property supported 0.1
mixed property supported 0.1
fileKey property supported 0.1
editorType property supported 0.1 “figma”
mode property supported 0.1 “default”
apiVersion property supported 0.1
pluginId property supported 0.1
currentUser property supported 0.1
activeUsers property supported 0.1
skipInvisibleInstanceChildren property supported 0.1
createFrame function supported 0.1 node.create
createRectangle function supported 0.1 node.create
createEllipse function supported 0.1 node.create
createPolygon function supported 0.1 node.create
createStar function supported 0.1 node.create
createSection function supported 0.1 node.create
createLine function supported 0.1 node.create
createPage function supported 0.1 page.create
group function supported 0.1 node.group
ungroup function supported 0.1 node.ungroup
getNodeById function supported 0.1 deprecated in Figma, kept for scripts
getNodeByIdAsync function supported 0.1
setCurrentPageAsync function supported 0.1
loadAllPagesAsync function supported 0.1 no-op
notify function supported 0.1 logged to console
closePlugin function supported 0.1 no-op
on function supported 0.1 no-op: no events in a script
once function supported 0.1 no-op
off function supported 0.1 no-op
getSelectionColors function supported 0.1
base64Encode function supported 0.1
base64Decode function supported 0.1
getNodeByIdSync function not planned 0.1
createText function supported 0.2 node.create empty text in Inter Regular 12, black
loadFontAsync function supported 0.2 checks services.fonts when given; text writes need it (CMD-15)
listAvailableFontsAsync function supported 0.2
hasMissingFont property supported 0.2 checked against services.fonts; false without it
createVector function supported 0.2 node.create
union function supported 0.2 boolean.create the nodes keep their positions; the operation takes the bottom node’s paints
subtract function supported 0.2 boolean.create the nodes keep their positions; the operation takes the bottom node’s paints
intersect function supported 0.2 boolean.create the nodes keep their positions; the operation takes the bottom node’s paints
exclude function supported 0.2 boolean.create the nodes keep their positions; the operation takes the bottom node’s paints
createNodeFromSvg function partial 0.2 import.svg embedded raster images need ud import svg (they are read in a preparation step)
createImage function supported 0.2 image.insert stores the bytes in the assets folder and registers them (asset.add)
createImageAsync function partial 0.2 image.insert data: URLs only; network URLs are refused (D4)
getImageByHash function supported 0.2
createBooleanOperation function not planned
flatten function supported 0.2b vector.flatten one VectorNode in place of the nodes (new id); booleans are baked, curves kept
getFileThumbnailNodeAsync function planned 0.6
setFileThumbnailNodeAsync function planned 0.6
createNodeFromJSXAsync function not planned
createLinkPreviewAsync function not planned
createGif function not planned
createVideoAsync function not planned
createAutoLayout function supported 0.3 layout.set figma-use convenience: a frame with auto layout (default VERTICAL) hugging both axes, no fill; props are assigned like node.set
createComponent function supported 0.4 node.create
createComponentFromNode function supported 0.4 component.create a frame keeps its id; another node is wrapped in a frame first
combineAsVariants function supported 0.4 component.combine
importComponentByKeyAsync function supported 0.4 key = component id, or lib-…/nd-… for a library component (a remote, read-only node over the imported copy)
importComponentSetByKeyAsync function supported 0.4
createPaintStyle function supported 0.4 style.create
createTextStyle function supported 0.4 style.create
createEffectStyle function supported 0.4 style.create
createGridStyle function supported 0.4 style.create
getLocalPaintStylesAsync function supported 0.4
getLocalPaintStyles function supported 0.4 deprecated in Figma, kept for scripts
getLocalTextStylesAsync function supported 0.4
getLocalTextStyles function supported 0.4 deprecated in Figma, kept for scripts
getLocalEffectStylesAsync function supported 0.4
getLocalEffectStyles function supported 0.4 deprecated in Figma, kept for scripts
getLocalGridStylesAsync function supported 0.4
getLocalGridStyles function supported 0.4 deprecated in Figma, kept for scripts
getStyleByIdAsync function supported 0.4
getStyleById function supported 0.4 deprecated in Figma, kept for scripts
importStyleByKeyAsync function partial 0.4 styles of this file and of imported library styles (lib-…/st-…); import new ones with ud library import
variables property supported 0.4
teamLibrary property partial 0.4 the libraries added to this file and their imported collections
moveLocalPaintStyleAfter function planned 0.4
moveLocalTextStyleAfter function planned 0.4
moveLocalEffectStyleAfter function planned 0.4
moveLocalGridStyleAfter function planned 0.4
moveLocalPaintFolderAfter function planned 0.4
moveLocalTextFolderAfter function planned 0.4
moveLocalEffectFolderAfter function planned 0.4
moveLocalGridFolderAfter function planned 0.4
createPageDivider function planned 0.4
createConnector function planned 0.5
showUI function not planned
createSticky function not planned
createShapeWithText function not planned
createCodeBlock function not planned
createTable function not planned
createWidget function not planned
createStamp function not planned
createHighlight function not planned
createWashiTape function not planned
createSlide function not planned
createSlideRow function not planned
createInteractiveSlideElement function not planned
openExternal function not planned
saveVersionHistoryAsync function not planned
getSlideGrid function not planned
setSlideGrid function not planned
ui property not planned
clientStorage property not planned
parameters property not planned
payments property not planned
codegen property not planned
textreview property not planned
widget property not planned
vscode property not planned
command property not planned
timer property not planned
constants property not planned
annotations property planned 0.4
util property supported 0.1
viewport property partial 0.1 scrollAndZoomIntoView is a no-op headless
ud property supported 1.2 UI Designer extension: the ud global
createSlice function supported 0.6 node.create an export region; it draws nothing
annotations property partial 0.6 annotation categories; categories are plain objects (no setLabel, setColor, remove)

figma.annotations#

Member Kind Status Since Command Notes
getAnnotationCategoriesAsync function supported 0.6 annotation.categories
getAnnotationCategoryByIdAsync function supported 0.6 annotation.categories
addAnnotationCategoryAsync function supported 0.6 annotation.addCategory

figma.util#

Member Kind Status Since Command Notes
rgb function supported 0.1
rgba function supported 0.1
solidPaint function supported 0.1
normalizeMarkdown function planned 0.4

figma.viewport#

Member Kind Status Since Command Notes
center property partial 0.1 a value held for the run
zoom property partial 0.1 a value held for the run
bounds property partial 0.1
scrollAndZoomIntoView function partial 0.1 no-op headless; a live editor scrolls
slidesView function not planned

figma.variables#

Member Kind Status Since Command Notes
createVariableCollection function supported 0.4 collection.create
createVariable function supported 0.4 variable.create
getLocalVariablesAsync function supported 0.4
getLocalVariableCollectionsAsync function supported 0.4
getVariableByIdAsync function supported 0.4
getVariableCollectionByIdAsync function supported 0.4
getLocalVariables function supported 0.4 deprecated in Figma, kept for scripts
getLocalVariableCollections function supported 0.4 deprecated in Figma, kept for scripts
getVariableById function supported 0.4 deprecated in Figma, kept for scripts
getVariableCollectionById function supported 0.4 deprecated in Figma, kept for scripts
importVariableByKeyAsync function partial 0.4 variables of this file and imported library variables (lib-…/vr-…); import new ones with ud library import
createVariableAlias function supported 0.4
createVariableAliasByIdAsync function supported 0.4
setBoundVariableForPaint function supported 0.4
setBoundVariableForEffect function supported 0.4
setBoundVariableForLayoutGrid function supported 0.4

figma.teamLibrary#

Member Kind Status Since Command Notes
getAvailableLibraryVariableCollectionsAsync function partial 0.4 collections imported from the libraries added to this file (ud library import)
getVariablesInLibraryCollectionAsync function partial 0.4 imported variables of the collection

ud#

Member Kind Status Since Command Notes
run function supported 0.1 any registry command inside the script’s transaction (CMD-13)
inspect function supported 0.1 node.describe node.describe; fields picks keys; platform (or fields: [“code”]) adds code: CSS or platform code, box model, variables, typography, assets (0.6)
actor property supported 0.1
insertUdx function partial 0.2 udx.insert returns the root nodes; image src paths and data: URLs need ud insert –udx (asset hashes work)
toUdx function supported 0.2 udx.export { ids: true } writes id attributes; the whole subtree is written
render function supported 0.2 {bytes, width, height, mime}: png (default), jpg or svg, scale, maxDimension
lint function supported 0.6 lint.run the design lint of a subtree or the document (DEV-6); the .design-lint.json file is not read inside a script
snippet function supported 0.6 codegen.snippet code for a node (DEV-2)
tokens function supported 0.6 tokens.export design tokens from the variables (VAR-9); the text, not a file
system function supported 0.4 system.digest the design-system digest (ud system)
comments function supported 0.6 comment.list the threads with their replies, oldest first; { open: true } leaves out resolved ones
comment function supported 0.6 comment.add a thread pinned to a node (x, y: the offset in it) or to a page point; category, severity and findingId are the review meta
setTextPath function supported 1.2 text.attachToPath text on a path (TXT-8): along a layer’s outline or SVG path data in the text’s space
detachTextPath function supported 1.2 text.detachFromPath sets text on a path straight again (TXT-8)

Image#

Member Kind Status Since Command Notes
hash property supported 0.2
getBytesAsync method supported 0.2
getSizeAsync method supported 0.2

PaintStyle#

Member Kind Status Since Command Notes
id property supported 0.4
type property supported 0.4 “PAINT”, “TEXT”, “EFFECT” or “GRID”
removed property supported 0.4
name property supported 0.4 style.update
description property supported 0.4 style.update
remote property supported 0.4
key property supported 0.4 the style id (lib-…/st-… for a library style)
hiddenFromPublishing property supported 0.4 style.update
remove method supported 0.4 style.delete
getStyleConsumersAsync method supported 0.4 style.usedBy
getPublishStatusAsync method partial 0.4 CURRENT when the file publishes a library (library.publish)
paints property supported 0.4 style.update
boundVariables property supported 0.4

TextStyle#

Member Kind Status Since Command Notes
id property supported 0.4
type property supported 0.4 “PAINT”, “TEXT”, “EFFECT” or “GRID”
removed property supported 0.4
name property supported 0.4 style.update
description property supported 0.4 style.update
remote property supported 0.4
key property supported 0.4 the style id (lib-…/st-… for a library style)
hiddenFromPublishing property supported 0.4 style.update
remove method supported 0.4 style.delete
getStyleConsumersAsync method supported 0.4 style.usedBy
getPublishStatusAsync method partial 0.4 CURRENT when the file publishes a library (library.publish)
fontName property supported 0.4 style.update
fontSize property supported 0.4 style.update
lineHeight property supported 0.4 style.update
letterSpacing property supported 0.4 style.update
paragraphSpacing property supported 0.4 style.update
paragraphIndent property supported 0.4 style.update
textCase property supported 0.4 style.update
textDecoration property supported 0.4 style.update
leadingTrim property supported 0.4 style.update
boundVariables property supported 0.4
setBoundVariable method supported 0.4 style.update

EffectStyle#

Member Kind Status Since Command Notes
id property supported 0.4
type property supported 0.4 “PAINT”, “TEXT”, “EFFECT” or “GRID”
removed property supported 0.4
name property supported 0.4 style.update
description property supported 0.4 style.update
remote property supported 0.4
key property supported 0.4 the style id (lib-…/st-… for a library style)
hiddenFromPublishing property supported 0.4 style.update
remove method supported 0.4 style.delete
getStyleConsumersAsync method supported 0.4 style.usedBy
getPublishStatusAsync method partial 0.4 CURRENT when the file publishes a library (library.publish)
effects property supported 0.4 style.update

GridStyle#

Member Kind Status Since Command Notes
id property supported 0.4
type property supported 0.4 “PAINT”, “TEXT”, “EFFECT” or “GRID”
removed property supported 0.4
name property supported 0.4 style.update
description property supported 0.4 style.update
remote property supported 0.4
key property supported 0.4 the style id (lib-…/st-… for a library style)
hiddenFromPublishing property supported 0.4 style.update
remove method supported 0.4 style.delete
getStyleConsumersAsync method supported 0.4 style.usedBy
getPublishStatusAsync method partial 0.4 CURRENT when the file publishes a library (library.publish)
layoutGrids property supported 0.4 style.update

Variable#

Member Kind Status Since Command Notes
id property supported 0.4
removed property supported 0.4
name property supported 0.4 variable.update
description property supported 0.4 variable.update
resolvedType property supported 0.4
variableCollectionId property supported 0.4
valuesByMode property supported 0.4 aliases as { type: “VARIABLE_ALIAS”, id }; UI Designer extension (VAR-10): expressions as { type: “EXPRESSION”, expression }, verbatim
scopes property supported 0.4 variable.update
codeSyntax property supported 0.4
hiddenFromPublishing property supported 0.4 variable.update
remote property supported 0.4
key property supported 0.4 the variable id (lib-…/vr-… for a library variable)
setValueForMode method supported 0.4 variable.setValue UI Designer extension (VAR-10): a FLOAT or STRING variable also takes { type: “EXPRESSION”, expression: “spacing/base * 2” }
resolveForConsumer method supported 0.4
setVariableCodeSyntax method supported 0.4 variable.update
removeVariableCodeSyntax method supported 0.4 variable.update
remove method supported 0.4 variable.delete

VariableCollection#

Member Kind Status Since Command Notes
id property supported 0.4
removed property supported 0.4
name property supported 0.4 collection.update
modes property supported 0.4
defaultModeId property supported 0.4
variableIds property supported 0.4
hiddenFromPublishing property supported 0.4 collection.update
remote property supported 0.4
key property supported 0.4
addMode method supported 0.4 mode.add
renameMode method supported 0.4 mode.rename
removeMode method supported 0.4 mode.remove
remove method supported 0.4 collection.delete