set_constraints
Define how a node reacts to parent frame resizing by setting horizontal and vertical constraints: MIN, MAX, CENTER, STRETCH, or SCALE. Works only on plain frames, not auto-layout.
Instructions
Set how a node responds when its parent frame is resized, via horizontal and vertical constraints: MIN pins to the left/top, MAX to the right/bottom, CENTER keeps it centered, STRETCH pins both edges (grows with the parent), and SCALE resizes proportionally. Constraints apply inside plain frames only — auto-layout frames position children by layout rules and ignore them. Returns { ok, nodeId }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Node to constrain | |
| vertical | Yes | Vertical behavior when the parent resizes | |
| horizontal | Yes | Horizontal behavior when the parent resizes |