Type: object
| Attribute | Type | Description |
|---|---|---|
| id | string | Layer's unique id |
| source_id | string (Optional) | Layer's identifier in the design tool |
| type | string ("text", "shape" or "group") | Type of the layer |
| name | string (Optional) | Name of the layer |
| rect | Bounding Rectangle | Bounding rectangle of the layer |
| fills | Layer Fill[] (Optional) | Fills applied to the layer |
| borders | Layer Border[] (Optional) | Borders of the layer |
| shadows | Layer Shadow[] (Optional) | Shadows applied to the layer |
| blur | Layer Blur (Optional) | - |
| opacity | number | Opacity of the layer, [0, 1] |
| blend_mode | Blend Mode (Optional) | - |
| border_radius | number (Optional) | Border radius of the layer |
| rotation | number (Optional) | Rotation of the layer |
| exportable | boolean (Optional) | Indicates whether the layer has assets or not |
| content | string (Optional) | Text of the text layer |
| text_styles | Layer Text Style[] (Optional) | - |
| layers | Layer[] (Optional) | - |
| component_name | string (Optional) | Name of the component the group layer is referencing |
| layout | Layer Layout (Optional) | Auto layout settings of the group layer |
| constraints | Layer Constraints (Optional) | Resizing constraints of the layer relative to its parent |
| corner_radius | Layer Corner Radius (Optional) | Per-corner border radius of the layer |
| layout_alignment | string ("min", "center", "max", "stretch", "inherit" or "baseline") (Optional) | Alignment of the layer within its parent's auto layout |
| layout_grow | number (Optional) | Factor by which the layer grows to fill its parent's auto layout |
| grid_child_horizontal_alignment | string ("center", "max", "min" or "auto") (Optional) | Horizontal alignment of the layer within its parent's grid cell |
| grid_child_vertical_alignment | string ("center", "max", "min" or "auto") (Optional) | Vertical alignment of the layer within its parent's grid cell |
| grid_column_index | integer (Optional) | Column index of the layer within its parent's grid |
| grid_column_span | integer (Optional) | Number of columns the layer spans within its parent's grid |
| grid_row_index | integer (Optional) | Row index of the layer within its parent's grid |
| grid_row_span | integer (Optional) | Number of rows the layer spans within its parent's grid |
| min_width | number (Optional) | Minimum width of the layer |
| max_width | number (Optional) | Maximum width of the layer |
| min_height | number (Optional) | Minimum height of the layer |
| max_height | number (Optional) | Maximum height of the layer |
Example
{
"id": "5db81e73e1e36ee19f138c1b",
"source_id": "96:4003",
"type": "group",
"name": "Frame",
"rect": {
"x": 0,
"y": 0,
"width": 40,
"height": 98,
"absolute": {
"x": 0,
"y": 0
}
},
"opacity": 1,
"blend_mode": "normal",
"border_radius": 0,
"rotation": 0,
"exportable": false,
"layout": {
"direction": "column",
"distribution": "min",
"gap": 18,
"item_alignment": "stretch",
"padding": {
"top": 0,
"right": 0,
"bottom": 0,
"left": 0
}
},
"constraints": {
"horizontal": {
"sizing_mode": "stretch"
},
"vertical": {
"sizing_mode": "hug-contents"
}
},
"layers": [
{
"id": "5db81e73e1e36ee19f138c1a",
"source_id": "2FF14739-F1CD-4221-A9C1-0EA296C67AD1",
"type": "shape",
"name": "First rectangle in group",
"rect": {
"x": 0,
"y": 0,
"width": 40,
"height": 40,
"absolute": {
"x": 0,
"y": 0
}
},
"fills": [
{
"type": "color",
"color": {
"source_id": "0BEBFEB3-A107-4D1D-A3B0-77D1FBD35F01",
"r": 143,
"g": 152,
"b": 5,
"a": 1
}
}
],
"borders": [
{
"thickness": 1,
"position": "inside",
"fill": {
"type": "color",
"color": {
"source_id": "0BEBFEB3-A107-4D1D-A3B0-77D1FBD35F01",
"r": 143,
"g": 152,
"b": 5,
"a": 1
}
}
}
],
"opacity": 1,
"blend_mode": "normal",
"border_radius": 0,
"rotation": 0,
"exportable": false,
"constraints": {
"horizontal": {
"sizing_mode": "fixed"
},
"vertical": {
"sizing_mode": "fixed"
}
},
"corner_radius": {
"top_left": 0,
"top_right": 0,
"bottom_right": 0,
"bottom_left": 0
}
}
]
}
