Overview
Convert a regular frame into an auto-layout frame or change the direction of an existing auto-layout frame. You can set the layout to horizontal, vertical, or remove auto-layout entirely.Parameters
The ID of the frame to modify
Layout mode for the frameOptions:
NONE- Remove auto-layout from the frameHORIZONTAL- Arrange children left to rightVERTICAL- Arrange children top to bottom
Whether the auto-layout frame wraps its childrenOptions:
NO_WRAP- Children stay in a single row/column (default)WRAP- Children wrap to multiple rows/columns when space runs out
Response
Examples
Convert to horizontal auto-layout
Create vertical list with wrapping
Remove auto-layout
Use Cases
Navigation bars: UseHORIZONTAL layout mode to arrange menu items in a row
Card grids: Combine HORIZONTAL layout with WRAP to create responsive card layouts
Form fields: Use VERTICAL layout mode to stack labels and inputs
Button groups: Use HORIZONTAL layout to arrange action buttons side by side
Related Tools
- set_item_spacing - Control spacing between children
- set_padding - Add padding around children
- set_axis_align - Control child alignment
- create_frame - Create frames with auto-layout from the start