create_frame
Generate a new frame in Figma with specified dimensions, position, auto-layout settings, and optional attributes like name, fill color, stroke color, and parent node.
Instructions
Create a new frame in Figma
Input Schema
Name | Required | Description | Default |
---|---|---|---|
counterAxisAlignItems | No | Counter axis alignment for auto-layout frame | |
fillColor | No | Fill color in RGBA format | |
height | Yes | Height of the frame | |
itemSpacing | No | Distance between children in auto-layout frame. Note: This value will be ignored if primaryAxisAlignItems is set to SPACE_BETWEEN. | |
layoutMode | No | Auto-layout mode for the frame | |
layoutSizingHorizontal | No | Horizontal sizing mode for auto-layout frame | |
layoutSizingVertical | No | Vertical sizing mode for auto-layout frame | |
layoutWrap | No | Whether the auto-layout frame wraps its children | |
name | No | Optional name for the frame | |
paddingBottom | No | Bottom padding for auto-layout frame | |
paddingLeft | No | Left padding for auto-layout frame | |
paddingRight | No | Right padding for auto-layout frame | |
paddingTop | No | Top padding for auto-layout frame | |
parentId | No | Optional parent node ID to append the frame to | |
primaryAxisAlignItems | No | Primary axis alignment for auto-layout frame. Note: When set to SPACE_BETWEEN, itemSpacing will be ignored as children will be evenly spaced. | |
strokeColor | No | Stroke color in RGBA format | |
strokeWeight | No | Stroke weight | |
width | Yes | Width of the frame | |
x | Yes | X position | |
y | Yes | Y position |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"counterAxisAlignItems": {
"description": "Counter axis alignment for auto-layout frame",
"enum": [
"MIN",
"MAX",
"CENTER",
"BASELINE"
],
"type": "string"
},
"fillColor": {
"additionalProperties": false,
"description": "Fill color in RGBA format",
"properties": {
"a": {
"description": "Alpha component (0-1)",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"b": {
"description": "Blue component (0-1)",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"g": {
"description": "Green component (0-1)",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"r": {
"description": "Red component (0-1)",
"maximum": 1,
"minimum": 0,
"type": "number"
}
},
"required": [
"r",
"g",
"b"
],
"type": "object"
},
"height": {
"description": "Height of the frame",
"type": "number"
},
"itemSpacing": {
"description": "Distance between children in auto-layout frame. Note: This value will be ignored if primaryAxisAlignItems is set to SPACE_BETWEEN.",
"type": "number"
},
"layoutMode": {
"description": "Auto-layout mode for the frame",
"enum": [
"NONE",
"HORIZONTAL",
"VERTICAL"
],
"type": "string"
},
"layoutSizingHorizontal": {
"description": "Horizontal sizing mode for auto-layout frame",
"enum": [
"FIXED",
"HUG",
"FILL"
],
"type": "string"
},
"layoutSizingVertical": {
"description": "Vertical sizing mode for auto-layout frame",
"enum": [
"FIXED",
"HUG",
"FILL"
],
"type": "string"
},
"layoutWrap": {
"description": "Whether the auto-layout frame wraps its children",
"enum": [
"NO_WRAP",
"WRAP"
],
"type": "string"
},
"name": {
"description": "Optional name for the frame",
"type": "string"
},
"paddingBottom": {
"description": "Bottom padding for auto-layout frame",
"type": "number"
},
"paddingLeft": {
"description": "Left padding for auto-layout frame",
"type": "number"
},
"paddingRight": {
"description": "Right padding for auto-layout frame",
"type": "number"
},
"paddingTop": {
"description": "Top padding for auto-layout frame",
"type": "number"
},
"parentId": {
"description": "Optional parent node ID to append the frame to",
"type": "string"
},
"primaryAxisAlignItems": {
"description": "Primary axis alignment for auto-layout frame. Note: When set to SPACE_BETWEEN, itemSpacing will be ignored as children will be evenly spaced.",
"enum": [
"MIN",
"MAX",
"CENTER",
"SPACE_BETWEEN"
],
"type": "string"
},
"strokeColor": {
"additionalProperties": false,
"description": "Stroke color in RGBA format",
"properties": {
"a": {
"description": "Alpha component (0-1)",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"b": {
"description": "Blue component (0-1)",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"g": {
"description": "Green component (0-1)",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"r": {
"description": "Red component (0-1)",
"maximum": 1,
"minimum": 0,
"type": "number"
}
},
"required": [
"r",
"g",
"b"
],
"type": "object"
},
"strokeWeight": {
"description": "Stroke weight",
"exclusiveMinimum": 0,
"type": "number"
},
"width": {
"description": "Width of the frame",
"type": "number"
},
"x": {
"description": "X position",
"type": "number"
},
"y": {
"description": "Y position",
"type": "number"
}
},
"required": [
"x",
"y",
"width",
"height"
],
"type": "object"
}