figma_create_frame
Create a Figma frame node with auto-layout (vertical by default) or free-form. Supports design token binding for fill, padding, spacing, and corner radius.
Instructions
Create a new frame node with optional auto-layout. Returns the created node ID. v1.8.0: defaults to layoutMode='VERTICAL' with paddingTop/Bottom=16, paddingLeft/Right=16, itemSpacing=12, primaryAxisSizingMode='AUTO', counterAxisSizingMode='AUTO'. Pass layoutMode='NONE' for legacy free-form frames.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Frame name | Frame |
| x | No | X position. If omitted, auto-positions to the right of existing content | |
| y | No | ||
| width | No | ||
| height | No | ||
| fillColor | No | Hex color e.g. '#ffffff'. DEPRECATED — prefer fillVariableKey for DS token binding (v1.8.1+). | |
| parentId | No | Parent node ID (default: current page) | |
| layoutMode | No | Auto-layout direction. VERTICAL by default; pass 'NONE' for free-form frames. | VERTICAL |
| paddingTop | No | ||
| paddingBottom | No | ||
| paddingLeft | No | ||
| paddingRight | No | ||
| itemSpacing | No | Gap between auto-layout children | |
| primaryAxisSizingMode | No | AUTO = hug contents, FIXED = use width/height | AUTO |
| counterAxisSizingMode | No | AUTO | |
| primaryAxisAlignItems | No | Main-axis alignment (MIN=top/left, MAX=bottom/right) | |
| counterAxisAlignItems | No | Cross-axis alignment | |
| layoutWrap | No | Wrap children when they exceed primary axis | |
| fillVariableKey | No | DS variable key for fill binding (from figma_get_library_variables). Takes precedence over fillColor. | |
| paddingVariableKey | No | DS spacing variable key — applies to all 4 paddings via setBoundVariable. | |
| itemSpacingVariableKey | No | DS spacing variable key for itemSpacing via setBoundVariable. | |
| cornerRadiusVariableKey | No | DS radius variable key for cornerRadius via setBoundVariable. | |
| cornerRadius | No | Hardcoded corner radius in px. DEPRECATED — prefer cornerRadiusVariableKey. |