figma_create_frame
Create an auto-layout container frame with design system variable bindings as a fallback when no component exists for a section or layout.
Instructions
Creates an auto-layout container frame (layout primitive) — the fallback when NO DS component exists for a section or layout. Every fill/padding/gap/radius binds to DS variables; component-like names are gated (pass confirmedNoComponent + primitiveOverrideReason for confirmed gaps). Name frames after their HTML role ("Header Section", "Card: Revenue"). Key params: parentId (omit for page-level artboard), direction, layoutSizing*, *Variable bindings, GRID mode. Check mimic_map_components FIRST. Phase 2+.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X position in pixels. Required for page-level artboards. Use rightmost existing artboard x + width + 80. | |
| y | No | Y position in pixels. Defaults to 0 for artboards. | |
| gap | No | Raw item spacing in pixels. Use gapVariable when DS has spacing variables. | |
| fill | No | Raw hex color for background fill (e.g. "#ffffff"). Fallback when no DS styles/variables. | |
| name | Yes | Semantic name describing the HTML role (e.g., "Header Section", "Metrics Row", "Card: Revenue"). Never use generic names like "Frame". | |
| width | No | Fixed width in pixels. | |
| height | No | Fixed height in pixels. | |
| stroke | No | Raw hex color for stroke (e.g. "#e4e6ee"). Fallback when no DS stroke variables. | |
| padding | No | Raw uniform padding in pixels. Use paddingVariable when DS has spacing variables. | |
| maxWidth | No | Max width constraint. | |
| parentId | No | Parent node ID. Omit for page-level. | |
| direction | No | Auto-layout direction. Prefer HORIZONTAL or VERTICAL — NONE breaks portability. Use layoutPositioning ABSOLUTE for overlay children instead. | |
| gridRowGap | No | Raw row gap in pixels. Only used when layoutMode is GRID. | |
| layoutMode | No | Set to GRID to use CSS-grid-style layout (Grid automation, May 2026) instead of auto-layout. Requires gridRowCount/gridColumnCount. Errors clearly on Figma versions that do not support GRID layoutMode — fall back to direction HORIZONTAL/VERTICAL in that case. | |
| paddingTop | No | Raw top padding in pixels. | |
| fillStyleId | No | DS fill style key for background (from figma_list_ds (kind: "fill_styles")). Preferred over fillVariable when DS has fill styles but no variables. | |
| gapVariable | No | DS variable path for item spacing. | |
| gridRowSpan | No | When this frame is a child of a GRID-layoutMode parent, how many rows it should span. | |
| paddingLeft | No | Raw left padding in pixels. | |
| clipsContent | No | Clip content to frame bounds. | |
| cornerRadius | No | Raw corner radius in pixels. Use cornerRadiusVariable when DS has radius variables. | |
| fillVariable | No | DS variable path for background fill. | |
| gridRowCount | No | Number of grid rows. Only used when layoutMode is GRID. | |
| paddingRight | No | Raw right padding in pixels. | |
| strokeWeight | No | Stroke weight in pixels. | |
| gridColumnGap | No | Raw column gap in pixels. Only used when layoutMode is GRID. | |
| paddingBottom | No | Raw bottom padding in pixels. | |
| gridColumnSpan | No | When this frame is a child of a GRID-layoutMode parent, how many columns it should span. | |
| strokeVariable | No | DS variable path for stroke color. | |
| gridColumnCount | No | Number of grid columns. Only used when layoutMode is GRID. | |
| paddingVariable | No | DS variable path for uniform padding. | |
| layoutPositioning | No | Set to ABSOLUTE to position this frame as an overlay inside an auto-layout parent (out of flow but still contained). Use for grid lines, positioned labels, etc. | |
| gridRowGapVariable | No | DS spacing variable path for GRID row gap. | |
| paddingTopVariable | No | DS variable path for top padding. | |
| paddingLeftVariable | No | DS variable path for left padding. | |
| confirmedNoComponent | No | Set true only after DS/library search confirms no component exists for this role. | |
| cornerRadiusVariable | No | DS variable path for corner radius. | |
| layoutSizingVertical | No | Vertical sizing mode. | |
| paddingRightVariable | No | DS variable path for right padding. | |
| counterAxisAlignItems | No | Counter axis alignment. | |
| gridColumnGapVariable | No | DS spacing variable path for GRID column gap. | |
| paddingBottomVariable | No | DS variable path for bottom padding. | |
| primaryAxisAlignItems | No | Primary axis alignment. | |
| layoutSizingHorizontal | No | Horizontal sizing mode. | |
| primitiveOverrideReason | No | Required with confirmedNoComponent for component-like primitives. Explain why this frame must be custom. |