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 |
Example
{
"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
}