bind_variable
Bind a Figma variable to a node property (fills, strokes, dimensions, spacing, typography) to enable design tokens and dynamic updates.
Instructions
Bind a variable to a node property. property 'fills' or 'strokes' binds the first solid paint's color (setBoundVariableForPaint). Other properties (width, height, cornerRadius, top/bottom/left/right radius, padding*, itemSpacing, counterAxisSpacing, strokeWeight, opacity, min/maxWidth, min/maxHeight, and text fields fontSize/fontWeight/lineHeight/letterSpacing/paragraphSpacing/paragraphIndent) use node.setBoundVariable. Variable type must match the property.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | The ID of the node to bind the variable to | |
| property | Yes | The property to bind: 'fills', 'strokes', or a bindable field name (e.g. width, height, cornerRadius, paddingLeft, itemSpacing, opacity, fontSize, lineHeight) | |
| variableId | Yes | The ID of the variable to bind |