Groups
Groups are collections of items, such as shapes, lines, or other groups. Groups cannot contain layers. Groups allow you to combine multiple items into a single, manageable unit. When you group items, you can move, resize, or format them collectively, treating the group as a single object. This is particularly useful when you want to maintain the relative positions of multiple items or when you want to apply formatting or actions to a set of items simultaneously.
Group Format
Property | Description | |
---|---|---|
id | ID Identifier for a given group (must be unique). | Required |
items | Array[ID] An array of IDs of all Shapes, Lines, and Groups in the group. | Optional |
note | Text Text to add as a note to the group. | Optional |
customData | Array[Custom Data] An array of custom data in the group. See Custom Data for a description of its purpose. | Optional |
linkedData | Array[Linked Data] An array of linked data in the group. See Linked Data for a description of its purpose. | Optional |
linkedData | Integer Defines the ordering between different shapes, lines, and groups. (like the z-index css attribute) All items in the group are placed into the same zIndex as the group, then ordered based on the relative zIndex of objects in the group. If items have the same zIndex, then item type (groups on top, then lines, and lastly shapes) will determine order. Multiple groups with the same zIndex will have the later group in the JSON on top. Defaults to 0 | Optional |
{
"id": "group1",
"items": [ ... ],
"note": "Test Note",
"customData": [ ... ],
"linkedData": [ ... ],
"zIndex": 0
}
Updated 13 days ago