Wraps Children

The Wraps Children property controls whether children wrap or stack beyond their container's boundaries when the container's Children Layout is set to Top to Bottom Stack or Left to Right Stack.

Wraps children makes children wrap when using either Top to Bottom Stack or Left to Right Stack.

If a parent has Wraps children set to true, the wrapping adjusts in response to resizing the parent.

Resizing a parent can change wrapping

Similarly, resizing a child may result in the stacking changing.

Resizing children can change wrapping

The row height in a Left to Right Stack is determined by the largest child in the row.

Height of each item in the row determines row height

Similarly, column width in a Top to bottom Stack is determined by the largest child in the column.

Width of each item in the column determines column width

Wraps Children and Width Units

Wrapping of children can only be performed if the parent's size does not depend on its children. If the parent's size does depend on its children, then the parent will expand to fit is children so wrapping will not occur.

If a parent container's Width Units is set to Relative to Children, then it adjusts in response to children size and positioning, so wrapping will not occur.

Stacking cannot occur if the parent uses a Width Units of Relative To Children

A parent can use the following Width Units and Height Units with children wrapping:

  • ✅Absolute

  • ✅Percentage of Parent

  • ✅Ratio of Parent

  • ✅Percentage of Width/Height

  • ✅Absolute Multiplied by Font Scale

A parent does not wrap its children if it uses:

  • ❌Relative to Children

Note that Relative to Children can be used on the non-stacking axis. For example, if a parent uses Left to Right Stack, then it can still have its Height Units set to Relative to Children.

Left to Right Stack with Height Units set to Relative to Children

Last updated

Was this helpful?