combine_as_variants
Combine multiple component nodes into a single component set, using variant syntax in names to derive properties. Reparents the components under the first component's parent by default.
Instructions
Combine two or more existing COMPONENT nodes into a single COMPONENT_SET (a variant set). Name each component with Figma variant syntax (e.g. "Size=Small", "Size=Large") beforehand so the set derives its properties. The components are reparented into the new set under parentId (default: the first component's current parent). Returns { ok, nodeId, name, type }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional name for the resulting component set | |
| nodeIds | Yes | Component node ids to combine (all must be COMPONENT nodes; at least 2) | |
| parentId | No | Parent to place the set under (default: the first component's parent) |