Change a frame, instance or text layer you created, using read_node's names: x, y, width, height, name, visible, clipsContent (clip children to the frame), auto-layout (layoutMode NONE | HORIZONTAL | VERTICAL, itemSpacing, counterAxisSpacing, padding or paddingTop/Right/Bottom/Left, primaryAxisSizingMode and counterAxisSizingMode FIXED | AUTO, primaryAxisAlignItems MIN | CENTER | MAX | SPACE_BETWEEN, counterAxisAlignItems MIN | CENTER | MAX, layoutWrap), a child's layoutGrow (0 | 1), layoutAlign (INHERIT | STRETCH) and layoutPositioning (AUTO | ABSOLUTE), fills and strokes (SOLID paints: { type: SOLID, color: "#RRGGBB", opacity?, variable? }, where variable binds the paint to one of the file's local colour variables by name; or { type: GRADIENT_LINEAR | GRADIENT_RADIAL, gradientStops: [{ position: 0-1, color, opacity? }], angle? (linear, degrees: 180 top to bottom, 90 left to right) or gradientTransform? }; or { type: IMAGE, image: "<PNG or JPEG path>" or imageHash, scaleMode?: FILL | FIT | STRETCH }), strokeWeight, strokeAlign (INSIDE, CENTER, OUTSIDE), cornerRadius or topLeftRadius/topRightRadius/bottomRightRadius/bottomLeftRadius, effects ({ type: DROP_SHADOW | INNER_SHADOW | LAYER_BLUR | BACKGROUND_BLUR, color?, opacity?, offset?: {x,y}, radius, spread? }) and opacity, and dashPattern (dash then gap lengths, [] for solid). On an instance: x, y, name, visible, size, and its own fills, strokes, strokeWeight, strokeAlign and dashPattern, which it keeps while the rest follows its component. On a text layer: x, y, width (fixes the width and wraps), height (fixes the box), name, visible, characters, fontFamily, fontStyle, fontSize, fills, textAlignHorizontal, lineHeight, letterSpacing, opacity, and as create_text takes them: runs (replacing the characters and their styles), paragraphs, paragraphSpacing, paragraphIndent, textDecoration, textCase, textAlignVertical, textAutoResize. A font, size, colour, spacing, decoration or case set on the layer applies to every character; new characters without runs take the layer's style. A text whose font, size, characters or runs change is estimated again (the result gives its size, provisional) and its auto-layout parent follows. A number that can come from a design token takes { variable: <name> } instead: itemSpacing, counterAxisSpacing, padding and each side, cornerRadius and each corner, width, height, opacity, and a text's fontSize; the value it resolves to is stored beside the binding. explicitVariableModes: { "Theme": "Dark" } shows a frame and everything in it in that mode. fillStyle, strokeStyle, effectStyle and textStyle apply a style by name (list_styles), null detaches one, and setting fills, strokes, effects or a text's font directly detaches the style it came from. componentPropertyReferences binds a layer inside a component to one of its properties; componentProperties sets an instance's values for them. On a slide (Figma Slides), a frame's properties and: transition { style (NONE, DISSOLVE, SMART_ANIMATE, SLIDE_FROM_, PUSH_FROM_, MOVE_FROM_ LEFT | RIGHT | TOP | BOTTOM, SLIDE_OUT_TO_, MOVE_OUT_TO_ the same), duration 0.01-10 s, curve (EASE_IN, EASE_OUT, EASE_IN_AND_OUT, LINEAR, EASE_IN_BACK, EASE_OUT_BACK, EASE_IN_AND_OUT_BACK, GENTLE), timing { type: ON_CLICK } or { type: AFTER_DELAY, delay } }, as the plugin API's setSlideTransition takes it; objectAnimations [{ node (a layer on the slide), type (FADE, SLIDE_FROM_LEFT | RIGHT | TOP | BOTTOM), phase (IN | OUT), duration }], each played on a click, in order, replacing the slide's; isSkippedSlide; and speakerNotes (text, a paragraph a line). Smart Animate moves the layers two slides share by name. In FigJam: a sticky or shape takes text { characters, fills }, fills, x and y, and a shape also width, height, fontSize and textAlignHorizontal; a table takes cells (rows of texts, the first its header; rows past the last are added) and x, y; a connector takes connectorStart and connectorEnd ({ endpointNodeId, magnet: AUTO | TOP | BOTTOM | LEFT | RIGHT | CENTER } or { position: { x, y } }), connectorStartStrokeCap and connectorEndStrokeCap (NONE, ARROW_LINES, ARROW_EQUILATERAL, TRIANGLE_FILLED, DIAMOND_FILLED, CIRCLE_FILLED…) and connectorLineType (STRAIGHT, ELBOWED, CURVED). To add one, duplicate_node a sticky, shape, table or connector the board has, then set it. Only the properties named change. Nothing changes if any value is refused.
| Argument | Type | Description |
|---|
handlerequired | string | The handle open_file returned. |
idrequired | string | A frame, instance or text layer you created. |
propertiesrequired | object { bottomLeftRadius, bottomRightRadius, characters, clipsContent, componentProperties, componentPropertyReferences, cornerRadius, counterAxisSpacing, effectStyle, effects, explicitVariableModes, fillStyle, fills, fontFamily, fontSize, fontStyle, height, itemSpacing, letterSpacing, lineHeight, name, opacity, padding, paddingBottom, paddingLeft, paddingRight, paddingTop, paragraphIndent, paragraphSpacing, paragraphs, runs, strokeAlign, strokeCap, strokeJoin, strokeStyle, strokeWeight, strokes, textAlignHorizontal, textAlignVertical, textAutoResize, textCase, textDecoration, textStyle, topLeftRadius, topRightRadius, visible, width, x, y } | |