figma_bind_variable
Bind a library variable to a node property like fills, strokes, or spacing by providing the variable key and target property. The node updates automatically when the design token changes.
Instructions
Import a library variable by key and bind it to a node property. For colors: binds to fills or strokes via setBoundVariableForPaint. For spacing/sizing: binds via setBoundVariable (paddingLeft, itemSpacing, cornerRadius, etc.). Get variableKey from figma_get_library_variables. The node's fill/spacing will dynamically update when the DS token changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| figmaUrl | No | Figma file URL for routing. | |
| fileKey | No | Target a specific connected file. | |
| nodeId | Yes | Target node ID | |
| variableKey | Yes | Variable import key from figma_get_library_variables | |
| property | Yes | Node property to bind the variable to | |
| paintIndex | No | For fills/strokes: which paint index (default 0) |