LayoutOptions interface.
Flex Container Properties
Defines the main axis direction of flex items.Values:
"column" | "column-reverse" | "row" | "row-reverse"Controls whether flex items wrap to multiple lines.Values:
"no-wrap" | "wrap" | "wrap-reverse"Aligns flex items along the cross axis.Values:
"auto" | "flex-start" | "center" | "flex-end" | "stretch" | "baseline" | "space-between" | "space-around" | "space-evenly"Aligns flex items along the main axis.Values:
"flex-start" | "center" | "flex-end" | "space-between" | "space-around" | "space-evenly"Flex Item Properties
Defines how much a flex item should grow relative to siblings.
Defines how much a flex item should shrink relative to siblings.Note: Defaults to 0 when explicit width or height is set.
Defines the default size of a flex item before remaining space is distributed.
Overrides the parent’s
alignItems for this specific item.Values: "auto" | "flex-start" | "center" | "flex-end" | "stretch" | "baseline" | "space-between" | "space-around" | "space-evenly"Size Properties
Sets the width of the component.
Sets the height of the component.
Sets the minimum width constraint.
Sets the minimum height constraint.
Sets the maximum width constraint.
Sets the maximum height constraint.
Position Properties
Defines the positioning type of the component.Values:
"static" | "relative" | "absolute"Sets the top position offset.
Sets the right position offset.
Sets the bottom position offset.
Sets the left position offset.
Spacing Properties
Margin
Sets margin on all sides.
Sets horizontal margin (left and right).
Sets vertical margin (top and bottom).
Sets top margin.
Sets right margin.
Sets bottom margin.
Sets left margin.
Padding
Sets padding on all sides.
Sets horizontal padding (left and right).
Sets vertical padding (top and bottom).
Sets top padding.
Sets right padding.
Sets bottom padding.
Sets left padding.
Overflow
Controls how content that overflows the component’s box is handled.Values:
"visible" | "hidden" | "scroll"Other Properties
Controls whether layout calculations are enabled for this component.
Type Definitions
Usage Example
Related
- Yoga Layout Documentation - Official Yoga Layout documentation
- Renderable - Base class that implements layout properties