set_parent
Reparent a Figma node by moving it under a new parent, optionally inserting at a specific index and preserving its absolute canvas position.
Instructions
Move a node so it becomes a child of another node (reparent). Uses appendChild, or insertChild when an index is given. Works with Auto Layout parents. Set keepPosition to preserve the node's absolute position (ignored for auto-layout parents).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Optional index at which to insert the node among the parent's children (uses insertChild). Omit to append at the end. | |
| nodeId | Yes | The ID of the node to move | |
| parentId | Yes | The ID of the new parent node | |
| keepPosition | No | If true, preserve the node's absolute canvas position after reparenting. Default false. Ignored for auto-layout parents. |