set_constraints
Control how a node responds when its parent frame is resized by applying horizontal and vertical constraints (MIN, MAX, CENTER, STRETCH, SCALE). Returns success and node ID.
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 |