create_component
Create an empty Figma component with configurable auto-layout settings. Returns its component ID for use as a parent or with component instances.
Instructions
Create a new empty component. Supports the same Auto Layout parameters as create_frame. Returns the component's ID for use as a parentId or with create_component_instance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X position | |
| y | Yes | Y position | |
| name | No | Optional name for the component | |
| width | Yes | Width of the component | |
| height | Yes | Height of the component | |
| parentId | No | Optional parent node ID to append the component to | |
| fillColor | No | Fill color in RGBA format | |
| layoutMode | No | Auto-layout mode for the component | |
| layoutWrap | No | Whether the auto-layout component wraps its children | |
| paddingTop | No | Top padding for auto-layout component | |
| itemSpacing | No | Distance between children in auto-layout component | |
| paddingLeft | No | Left padding for auto-layout component | |
| strokeColor | No | Stroke color in RGBA format | |
| paddingRight | No | Right padding for auto-layout component | |
| strokeWeight | No | Stroke weight | |
| paddingBottom | No | Bottom padding for auto-layout component | |
| layoutSizingVertical | No | Vertical sizing mode for auto-layout component | |
| counterAxisAlignItems | No | Counter axis alignment for auto-layout component | |
| primaryAxisAlignItems | No | Primary axis alignment for auto-layout component | |
| layoutSizingHorizontal | No | Horizontal sizing mode for auto-layout component |