Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Default values for the different layer types in the Figma plugin API
{
"RECTANGLE": {
"type": "RECTANGLE",
"name": "Rectangle",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "PASS_THROUGH",
"isMask": false,
"effects": [],
"effectStyleId": "",
"fills": [
{
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 0.7686274647712708,
"g": 0.7686274647712708,
"b": 0.7686274647712708
}
}
],
"fillStyleId": "",
"strokes": [],
"strokeStyleId": "",
"strokeWeight": 1,
"strokeAlign": "INSIDE",
"strokeCap": "NONE",
"strokeJoin": "MITER",
"dashPattern": [],
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 100,
"height": 100,
"rotation": 0,
"exportSettings": [],
"constraints": {
"horizontal": "MIN",
"vertical": "MIN"
},
"cornerRadius": 0,
"cornerSmoothing": 0,
"topLeftRadius": 0,
"topRightRadius": 0,
"bottomLeftRadius": 0,
"bottomRightRadius": 0
},
"LINE": {
"type": "LINE",
"name": "Line",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "PASS_THROUGH",
"isMask": false,
"effects": [],
"effectStyleId": "",
"fills": [],
"fillStyleId": "",
"strokes": [
{
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 0,
"g": 0,
"b": 0
}
}
],
"strokeStyleId": "",
"strokeWeight": 1,
"strokeAlign": "CENTER",
"strokeCap": "NONE",
"strokeJoin": "MITER",
"dashPattern": [],
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 100,
"height": 0,
"rotation": 0,
"exportSettings": [],
"constraints": {
"horizontal": "MIN",
"vertical": "MIN"
}
},
"ELLIPSE": {
"type": "ELLIPSE",
"name": "Ellipse",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "PASS_THROUGH",
"isMask": false,
"effects": [],
"effectStyleId": "",
"fills": [
{
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 0.7686274647712708,
"g": 0.7686274647712708,
"b": 0.7686274647712708
}
}
],
"fillStyleId": "",
"strokes": [],
"strokeStyleId": "",
"strokeWeight": 1,
"strokeAlign": "INSIDE",
"strokeCap": "NONE",
"strokeJoin": "MITER",
"dashPattern": [],
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 100,
"height": 100,
"rotation": 0,
"exportSettings": [],
"constraints": {
"horizontal": "MIN",
"vertical": "MIN"
},
"cornerRadius": 0,
"cornerSmoothing": 0,
"arcData": {
"startingAngle": 0,
"endingAngle": 6.2831854820251465,
"innerRadius": 0
}
},
"POLYGON": {
"type": "POLYGON",
"name": "Polygon",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "PASS_THROUGH",
"isMask": false,
"effects": [],
"effectStyleId": "",
"fills": [
{
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 0.7686274647712708,
"g": 0.7686274647712708,
"b": 0.7686274647712708
}
}
],
"fillStyleId": "",
"strokes": [],
"strokeStyleId": "",
"strokeWeight": 1,
"strokeAlign": "INSIDE",
"strokeCap": "NONE",
"strokeJoin": "MITER",
"dashPattern": [],
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 100,
"height": 100,
"rotation": 0,
"exportSettings": [],
"constraints": {
"horizontal": "MIN",
"vertical": "MIN"
},
"cornerRadius": 0,
"cornerSmoothing": 0,
"pointCount": 3
},
"STAR": {
"type": "STAR",
"name": "Star",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "PASS_THROUGH",
"isMask": false,
"effects": [],
"effectStyleId": "",
"fills": [
{
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 0.7686274647712708,
"g": 0.7686274647712708,
"b": 0.7686274647712708
}
}
],
"fillStyleId": "",
"strokes": [],
"strokeStyleId": "",
"strokeWeight": 1,
"strokeAlign": "INSIDE",
"strokeCap": "NONE",
"strokeJoin": "MITER",
"dashPattern": [],
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 100,
"height": 100,
"rotation": 0,
"exportSettings": [],
"constraints": {
"horizontal": "MIN",
"vertical": "MIN"
},
"cornerRadius": 0,
"cornerSmoothing": 0,
"pointCount": 5,
"innerRadius": 0.3819660246372223
},
"VECTOR": {
"type": "VECTOR",
"name": "Vector",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "PASS_THROUGH",
"isMask": false,
"effects": [],
"effectStyleId": "",
"fills": [],
"fillStyleId": "",
"strokes": [
{
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 0,
"g": 0,
"b": 0
}
}
],
"strokeStyleId": "",
"strokeWeight": 1,
"strokeAlign": "CENTER",
"strokeCap": "NONE",
"strokeJoin": "MITER",
"dashPattern": [],
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 100,
"height": 100,
"rotation": 0,
"exportSettings": [],
"constraints": {
"horizontal": "MIN",
"vertical": "MIN"
},
"cornerRadius": 0,
"cornerSmoothing": 0,
"vectorNetwork": {
"regions": [],
"segments": [],
"vertices": []
},
"vectorPaths": [],
"handleMirroring": "NONE"
},
"TEXT": {
"type": "TEXT",
"name": "Text",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "PASS_THROUGH",
"isMask": false,
"effects": [],
"effectStyleId": "",
"fills": [
{
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 0,
"g": 0,
"b": 0
}
}
],
"fillStyleId": "",
"strokes": [],
"strokeStyleId": "",
"strokeWeight": 1,
"strokeAlign": "OUTSIDE",
"strokeCap": "NONE",
"strokeJoin": "MITER",
"dashPattern": [],
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 0,
"height": 14,
"rotation": 0,
"exportSettings": [],
"constraints": {
"horizontal": "MIN",
"vertical": "MIN"
},
"textStyleId": "",
"characters": "",
"autoRename": true,
"fontSize": 12,
"paragraphIndent": 0,
"paragraphSpacing": 0,
"textAlignHorizontal": "LEFT",
"textAlignVertical": "TOP",
"textCase": "ORIGINAL",
"textDecoration": "NONE",
"textAutoResize": "WIDTH_AND_HEIGHT",
"letterSpacing": {
"unit": "PERCENT",
"value": 0
},
"lineHeight": {
"unit": "AUTO"
},
"fontName": {
"family": "Roboto",
"style": "Regular"
}
},
"FRAME": {
"type": "FRAME",
"name": "Frame",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "PASS_THROUGH",
"isMask": false,
"effects": [],
"effectStyleId": "",
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 100,
"height": 100,
"rotation": 0,
"children": [],
"layoutGrids": [],
"gridStyleId": "",
"backgrounds": [
{
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 1,
"g": 1,
"b": 1
}
}
],
"backgroundStyleId": "",
"clipsContent": true,
"guides": [],
"exportSettings": [],
"constraints": {
"horizontal": "MIN",
"vertical": "MIN"
}
},
"COMPONENT": {
"type": "COMPONENT",
"name": "Component",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "PASS_THROUGH",
"isMask": false,
"effects": [],
"effectStyleId": "",
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 100,
"height": 100,
"rotation": 0,
"children": [],
"layoutGrids": [],
"gridStyleId": "",
"backgrounds": [
{
"type": "SOLID",
"visible": false,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 1,
"g": 1,
"b": 1
}
}
],
"backgroundStyleId": "",
"clipsContent": false,
"guides": [],
"exportSettings": [],
"constraints": {
"horizontal": "MIN",
"vertical": "MIN"
},
"description": "",
"remote": false,
"key": ""
},
"PAGE": {
"type": "PAGE",
"name": "Page 2",
"children": [],
"guides": [],
"selection": [],
"backgrounds": [
{
"type": "SOLID",
"visible": true,
"opacity": 1,
"blendMode": "NORMAL",
"color": {
"r": 0.8980392217636108,
"g": 0.8980392217636108,
"b": 0.8980392217636108
}
}
],
"exportSettings": []
},
"SLICE": {
"type": "SLICE",
"name": "Slice",
"visible": true,
"locked": false,
"relativeTransform": [[1, 0, 0], [0, 1, 0]],
"x": 0,
"y": 0,
"width": 100,
"height": 100,
"rotation": 0,
"exportSettings": []
}
}
@darknoon

This comment has been minimized.

Copy link
Owner Author

@darknoon darknoon commented Oct 25, 2019

This is meant to be all of the SceneNode types, but excludes:

"INSTANCE", "BOOLEAN_OPERATION" because there isn't a way to create them from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment