swap_component
Swap the main component of a Figma instance by providing its node ID and either a published component key or a local component node ID. Returns success and the instance node ID.
Instructions
Swap an instance's main component. Provide componentKey (published component, imported via the API) or componentId (a local COMPONENT node). Returns { ok, nodeId } (the instance id).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instanceId | Yes | Instance node id to swap | |
| componentId | No | Local component node id | |
| componentKey | No | Published component key |