set_layout_props
Set auto-layout sizing, alignment, and position properties on a Figma node. Control HUG, FILL, FIXED sizing, bounds, and absolute positioning.
Instructions
Set a node's auto-layout sizing and child properties. layoutSizingHorizontal / layoutSizingVertical (HUG = shrink to fit children, FILL = stretch to fill the auto-layout parent, FIXED = keep the current size) are the preferred way to size a frame to its content (HUG) or make a child fill its container (FILL) — reach for these instead of guessing pixel sizes with resize_nodes. layoutAlign (STRETCH = fill the counter axis, INHERIT = default) and layoutGrow (1 = fill the primary axis, 0 = hug) are the older per-axis equivalents. layoutPositioning (ABSOLUTE = ignore the flow and position freely, AUTO = participate in layout). minWidth / maxWidth / minHeight / maxHeight set responsive size bounds (→ min-w / max-w); pass null to clear a bound. Bounds apply to auto-layout frames and their direct children. HUG needs an auto-layout frame (or text); FILL needs an auto-layout parent. Any field may be omitted to leave it unchanged. Returns { ok, nodeId }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Node id — an auto-layout frame, or a child inside one | |
| maxWidth | No | Maximum width in px (null clears the bound) | |
| minWidth | No | Minimum width in px (null clears the bound) | |
| maxHeight | No | Maximum height in px (null clears the bound) | |
| minHeight | No | Minimum height in px (null clears the bound) | |
| layoutGrow | No | 1 = grow to fill the primary axis, 0 = hug content | |
| layoutAlign | No | Counter-axis alignment; STRETCH fills the counter axis | |
| layoutPositioning | No | ABSOLUTE takes the node out of the auto-layout flow | |
| layoutSizingVertical | No | Vertical sizing: HUG fits content, FILL fills the parent, FIXED keeps height | |
| layoutSizingHorizontal | No | Horizontal sizing: HUG fits content, FILL fills the parent, FIXED keeps width |