figma_add_component_property
Adds BOOLEAN, TEXT, INSTANCE_SWAP, VARIANT, or SLOT properties to Figma components and component sets, enabling dynamic content and behavior in instances.
Instructions
Add a new component property to a component or component set. Properties enable dynamic content and behavior in component instances. Supported types: BOOLEAN (toggle), TEXT (string), INSTANCE_SWAP (component swap), VARIANT (variant selection), SLOT (freeform slot — prefer figma_create_slot for new slots).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"nodeId": "<nodeId>",
"propertyName": "<propertyName>",
"type": "<type>"
},
"name": "figma_add_component_property"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Property type: BOOLEAN for toggles, TEXT for strings, INSTANCE_SWAP for component swaps, VARIANT for variant selection, SLOT for freeform slot areas | |
| nodeId | Yes | The component or component set node ID | |
| description | No | Property description (SLOT properties only) | |
| defaultValue | No | Default value. Required for TEXT (string), INSTANCE_SWAP (component id), and VARIANT (a non-empty variant option name — Figma rejects empty). Optional for BOOLEAN (defaults false). Omit for SLOT. | |
| propertyName | Yes | Name for the new property (e.g., 'Show Icon', 'Button Label', 'Content') | |
| preferredValues | No | Preferred components (INSTANCE_SWAP and SLOT only) |