figma_swap_main_component
Swap the main component of a Figma instance node to a different variant using its component key, bypassing property setters.
Instructions
Swap the main component of an INSTANCE node to a different component (by key). Changes which variant the instance is based on — bypasses setProperties entirely. Use figma_get_component_variants to find available variant keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Node ID of the INSTANCE to swap. | |
| componentKey | Yes | Key of the new component to swap to. |