penpot_add_variant
Add a new variant to an existing variant group by specifying its name, properties, and shapes. Returns component and instance IDs for reuse.
Instructions
Add a new variant to an already-existing variant group container (created via penpot_create_variant_group). Accepts the same shape specs as one entry in penpot_create_variant_group's "variants" array. The containerId must be the id of the variant group's container frame (returned as "containerId" by penpot_create_variant_group, or found via penpot_find_shapes/penpot_list_components). Returns the new componentId and mainInstanceId, usable with penpot_add_component_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": {
"fileId": "<fileId>",
"pageId": "<pageId>",
"containerId": "<containerId>",
"groupName": "<groupName>",
"variant": "<variant>"
},
"name": "penpot_add_variant"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | ||
| pageId | Yes | ||
| variant | Yes | ||
| groupName | Yes | ||
| tokensPath | No | /app/tokens.json | |
| containerId | Yes |