Set auto layout on a frame
figma_set_auto_layoutSet auto layout on a Figma frame, specifying direction, spacing, padding, and alignment. Pass mode NONE to disable; only named properties change.
Instructions
Turns auto layout on for a frame and sets its direction, spacing, padding and alignment. Pass mode "NONE" to turn it off. Only the properties you name are changed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Layout direction. | |
| nodeId | Yes | The frame, component or instance to lay out. | |
| padding | No | Shorthand: sets all four paddings. | |
| paddingTop | No | ||
| itemSpacing | No | Gap between children. | |
| paddingLeft | No | ||
| paddingRight | No | ||
| paddingBottom | No | ||
| counterAxisAlignItems | No | Alignment across the layout direction. | |
| primaryAxisAlignItems | No | Alignment along the layout direction. |