swap_component
Swap the main component of a Figma instance using a local component ID or a published component key.
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 |