set_position
Set a node's exact position relative to its parent. Use to place overlays, badges, or pinned elements at a known spot, or to position a top-level frame on the canvas.
Instructions
Set a node's exact position (x / y), relative to its parent — for a top-level node these are canvas coordinates; for an absolutely-positioned child they are relative to its auto-layout parent. Use this to place an overlay / badge / pinned element at a known spot, or to position a top-level frame on the canvas; to nudge by a delta instead use move_nodes. A node that sits in-flow inside an auto-layout frame is positioned by the layout — set layoutPositioning ABSOLUTE (set_layout_props) first to place it freely. Either coordinate may be omitted to leave it unchanged. Returns { ok, nodeId }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X position relative to the parent | |
| y | No | Y position relative to the parent | |
| nodeId | Yes | Node id to position |