add_component_property
Add a TEXT, BOOLEAN, or INSTANCE_SWAP property to a Figma component or component set and optionally bind it to a child node to control text, visibility, or instance swapping.
Instructions
Add a component property (TEXT, BOOLEAN or INSTANCE_SWAP) to a COMPONENT or COMPONENT_SET. Optionally link it to a child node: TEXT controls the node's characters, BOOLEAN its visibility, INSTANCE_SWAP the main component of a nested instance.
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": {
"componentId": "<componentId>",
"name": "<name>",
"type": "<type>",
"defaultValue": "<defaultValue>"
},
"name": "add_component_property"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Property name | |
| type | Yes | Property type | |
| componentId | Yes | ID of the COMPONENT or COMPONENT_SET | |
| defaultValue | Yes | Default value: string for TEXT, boolean for BOOLEAN, component ID for INSTANCE_SWAP | |
| targetNodeId | No | Optional child node ID to bind (TEXT node for TEXT, any node for BOOLEAN, INSTANCE node for INSTANCE_SWAP) |