Skip to content
NativeScript Unified

NativeScript views

WrapLayout

<WrapLayout> is a wrapping flex container. Children flow along the orientation and wrap when they run out of room.

AttributeValuesResult
orientationhorizontal (default), verticalflex-direction: row or column, with flex-wrap: wrap
itemWidthnumber or lengthwidth set on every direct child
itemHeightnumber or lengthheight set on every direct child

A bare number means pixels. px, % and dip are also accepted.

1
2
3
4
5
6
7
8

HTML-first equivalent

The polyfill is a flex container with flex-wrap: wrap. In HTML that is flex flex-wrap. itemWidth and itemHeight become a width and height on each child:

1
2
3
4
5
6