Layer

Type: object

AttributeTypeDescription
idstringLayer's unique id
source_idstring (Optional)Layer's identifier in the design tool
typestring ("text", "shape" or "group")Type of the layer
namestring (Optional)Name of the layer
rectBounding RectangleBounding rectangle of the layer
fillsLayer Fill[] (Optional)Fills applied to the layer
bordersLayer Border[] (Optional)Borders of the layer
shadowsLayer Shadow[] (Optional)Shadows applied to the layer
blurLayer Blur (Optional)-
opacitynumberOpacity of the layer, [0, 1]
blend_modeBlend Mode (Optional)-
border_radiusnumber (Optional)Border radius of the layer
rotationnumber (Optional)Rotation of the layer
exportableboolean (Optional)Indicates whether the layer has assets or not
contentstring (Optional)Text of the text layer
text_stylesLayer Text Style[] (Optional)-
layersLayer[] (Optional)-
component_namestring (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
}