group
Container that binds several layers together. Membership is explicit via layer_ids; the optional auto-layout knobs arrange the members automatically.
Import-only
group has no generation-time counterpart — generation only overrides properties of existing layers, it does not create structure, so there is no "Element Properties → Group" page. Group layout is authored entirely at import time.
layer_ids sits on the layer, not in properties
A group holds the same children in every format, so its membership is declared once — alongside layout and properties, the way a layer's animation is. Putting it inside properties is unknown_field; leaving it off a group is missing_required; putting it on any other layer type is unsupported_for_type.
{
"name": "cta-block",
"type": "group",
"layer_ids": ["headline", "button"],
"layout": { "square": { "x": 0, "y": 0, "width": 300, "height": 200 } },
"properties": { "square": { "auto_layout": true, "gap": 8 } }
}Everything left in properties — the auto-layout knobs below — is per-format: a group can arrange the same children differently in each one.
The per-format properties:
| Property | Type | Notes |
|---|---|---|
auto_layout | boolean | Enable automatic arrangement of the members. Defaults to false. |
direction | enum | horizontal | vertical. Defaults to horizontal. |
alignment | enum | Which of the 9 grid cells the laid-out children anchor to — the same "<vertical> <horizontal>" values as an image's alignment: top left, top center, top right, middle left, middle center, middle right, bottom left, bottom center, bottom right. A single token is also accepted and names one axis, the other taking its middle value: center is middle center, top is top center, left is middle left. Exports always return the two-token form. The field is alignment, space-separated like every other grid in the contract; the editor's hyphenated placement spelling is internal and is rejected with unknown_field. |
gap | number | Spacing between members. static / animated: integer px (0–1000, default 10). printer: float in the format's unit (default 0). |
Not group properties
A group carries no visual styling of its own: opacity, rotation, padding and background_color are all unknown_field on group. Style the members instead. On printer_multipage, layer_ids are page-scoped — see Multi-Page Print Imports.
Group auto-layout is rejected on animated
On animated designs the auto-layout knobs (auto_layout, direction, alignment, gap) are rejected with unsupported_for_type — an animated group carries only its layer_ids and its per-layer animation. See Animated Imports.
Masking a group
A group whose members are clipped to a shape is just a group with a mask. There is no separate layer type: the mask is what makes it masked, so naming a type as well would let a payload contradict itself. Everything else — including the layer-level layer_ids — is unchanged.
The mask object:
| Field | Type | Notes |
|---|---|---|
shape | enum | Required. rectangle or circle. |
width / height | number | Required. static / animated: integer px, 0–20000. printer: float ≥ 0 in the format's unit. |
center_x / center_y | number | Required. Centre of the mask, same units as width. Signed — static / animated: integer −20000–20000; printer: float, unbounded. |
radius | object | int | Corner rounding — { tl, tr, bl, br }, or one number for all four. Same per-corner ranges as the radius property in Shared Object Shapes. |
rx / ry | number | Ellipse radii, for a circle mask that is not a perfect circle. Same range as width / height. |
rotation | float | 0–360 inclusive. |
{
"name": "photo-frame",
"type": "group",
"layer_ids": ["hero", "caption"],
"layout": { "x": 0, "y": 0, "width": 600, "height": 400 },
"properties": {
"mask": { "shape": "rectangle", "width": 585, "height": 351, "center_x": 515, "center_y": 401, "radius": 12 }
}
}There is no masked_group layer type
Send type: "group" and give it a mask — that is the only way to create a masked group. type: "masked_group" is rejected with unknown_enum_value at layers[i].type. Exports always return group.
