figma_create_slot
Creates a SlotNode inside a Figma component, adding a linked SLOT property and a freeform drop zone for instance content. Use it to build flexible component slots instead of INSTANCE_SWAP.
Instructions
Create a SlotNode inside a component using createSlot(). Automatically creates a linked SLOT component property named after the slot (renaming the slot renames the property). Slots are freeform drop zones for instance content — more flexible than INSTANCE_SWAP. Works on standalone COMPONENTs and variant COMPONENTs inside a COMPONENT_SET (call once per variant). GRID layout is not allowed on slots. Requires Desktop Bridge.
MULTI-FILE (Local Mode only): Pass fileKey to run this against a specific connected file without switching the active file/target lock (see figma_list_open_files). Does not change the active file or target lock. Cloud Mode pairs with a single plugin instance and rejects fileKey.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Slot layer name (e.g. 'Content', 'Footer') | |
| width | No | Initial slot width in pixels | |
| height | No | Initial slot height in pixels | |
| nodeId | Yes | The COMPONENT node ID to add a slot to | |
| fileKey | No | Local Mode only. Run against this specific connected file instead of the active file. Does not change the active file or target lock. Get connected fileKeys from figma_list_open_files. Rejected in Cloud Mode, which pairs with a single plugin instance. | |
| layoutMode | No | Auto-layout mode for the slot (GRID is not supported) |