Bind Variable
node_bind_variableBind design tokens to node properties like fills, strokes, and spacing, or set explicit variable modes for consistent theming across Figma designs.
Instructions
Bind a variable to a node property, or set an explicit variable mode. Use instead of a literal node_set_* when the value should track a design token. Ordering rules: set auto-layout before binding padding/spacing; set a solid fill before binding a colour token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | The ID of the node to bind variables to | |
| nodeName | Yes | Name of the node to verify against | |
| bindVariables | No | Map of property names to variable IDs (to bind) or null (to unbind). Valid fields: fills, strokes, height, width, characters, itemSpacing, paddingLeft, paddingRight, paddingTop, paddingBottom, visible, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius, minWidth, maxWidth, minHeight, maxHeight, counterAxisSpacing, strokeWeight, strokeTopWeight, strokeRightWeight, strokeBottomWeight, strokeLeftWeight, opacity, gridRowGap, gridColumnGap, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, paragraphSpacing, paragraphIndent. E.g., { 'fills': 'VariableID:1:2' } | |
| explicitVariableModes | No | Map of variable collection IDs to mode IDs. E.g., { 'VariableCollectionID:1:2': 'ModeID:1:3' } |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name of the modified node | |
| message | No | Status message | |
| success | No | Whether the variables were bound successfully |