set_constraint
Define and apply horizontal and vertical layout constraints (left, right, top, bottom, center, scale, stretch) to Figma nodes. Supports batch operations, child nodes, and aspect ratio preservation for precise design control.
Instructions
Set constraints (left/right/top/bottom/center/scale/stretch) for one or more Figma nodes.
Returns: Array of result objects for each operation.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
applyToChildren | No | If true, apply constraints to all children of the node(s). | |
constraint | No | A single constraint entry to apply. | |
constraints | No | An array of constraint entries to apply in batch. | |
maintainAspectRatio | No | If true, maintain the aspect ratio when applying constraints. |