figma_insert_component_instance
Insert a master component or component set instance into the canvas or an AutoLayout frame, applying variant properties and text overrides, with an optional PNG capture for visual verification.
Instructions
Create and insert an instance of a master component or component set into the canvas or target AutoLayout container. Supports selecting variants, applying text overrides with auto font loading, and can return a PNG screenshot (capture: true) for visual verification.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Screenshot resolution scale (default: 1) | |
| target | No | fileName of a specific connected Figma document, when more than one is open (see figma_list_targets). | |
| capture | No | Whether to capture and return a PNG screenshot of the inserted instance (default: false) | |
| position | No | Optional placement coordinates or child index in AutoLayout container | |
| properties | No | Key-value map of variant properties and component properties to apply (e.g. {'Type': 'Primary', 'Size': 'MD', 'State': 'Default'}) | |
| component_id | No | Direct node ID of the master component or ComponentSet (optional alternative to component_name) | |
| component_name | No | Name of the master component or ComponentSet to instantiate (e.g. 'Button', 'Card', 'Input') | |
| text_overrides | No | Key-value map of text overrides for text layers inside the component (e.g. {'Label': 'Submit', 'Description': 'Confirm order'}) | |
| target_parent_id | No | Target container/frame node ID to insert the instance into. If omitted, inserts into current selected frame or active page. |