penpot_create_variant_group
Group multiple component main instances into a variant group with shared property axes, enabling Penpot's variant swap UI on instances.
Instructions
Create a Penpot variant group: a container frame physically grouping two or more component main instances that share property axes (e.g. a "Button" with Type=Primary/Secondary variants), enabling Penpot's variant swap UI/switchVariant on instances of these components. Each entry in "variants" accepts the same shape specs as penpot_create_component. Returns one componentId per variant, 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>",
"groupName": "<groupName>",
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>",
"variants": "<variants>"
},
"name": "penpot_create_variant_group"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| width | Yes | ||
| fileId | Yes | ||
| height | Yes | ||
| layout | No | ||
| pageId | Yes | ||
| variants | Yes | ||
| groupName | Yes | ||
| tokensPath | No | /app/tokens.json |