figma_replace_component
Replace any Figma node with a new component instance at the same position in its parent, correcting wrong component insertions without rebuilding the frame.
Instructions
Replace an existing node with a new component instance at the same position in its parent. Deletes the target node, inserts the new component at the same parent index. Use this to fix a wrong component insertion without rebuilding the parent frame.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Node ID of the node to replace. | |
| componentKey | Yes | Key of the replacement component. | |
| fileKey | No | ||
| layoutSizingHorizontal | No | ||
| layoutSizingVertical | No | ||
| height | No |