Stack Views

Appstent supports adding multiple content views in a stack container. The stack can be horizontal (x-axis), vertical (y-axis) or layered (z-axis).

The type of the stack is represented by the value of field type as follows:

  • "hStack" -- creates a Horizontal Stack View

  • "vStack" -- creates a Vertical Stack View

  • "zStack" -- creates a z-axis layer stack view

Scrollable Stack Views

Horizontal and Vertical views can either be created to a certain scrollable width/height or make the stack fill the width/height based on the contained views. To make the stack views scrollable, set the property scrollable to true.

Following example shows a scrollable horizontal stack view:

{
    "type": "hStack",
    "scrollable": true,
    "views": [
        {
            "type": "text",
            "text": "Item 1"
        },
        {
            "type": "text",
            "text": "Item 2"
        }
    ]
}

Last updated