Stack
Arranges controls in a column, row or responsive grid.
When to use
- Lay out related controls with a consistent gap and alignment.
Examples
Inline details
Loading the example
<k:Stack row="true" gap="8" align="center">
<k:Text text="SO-104"/>
<k:Status state="wait" text="Packing"/>
</k:Stack>An order summary with two columns
The grid falls back to a single column on a narrow screen.
Loading the example
<k:Stack columns="2fr 1fr" gap="20" align="start">
<k:Stack gap="4">
<k:Text kind="heading" text="Order SO-104"/>
<k:Text text="Collection at the north warehouse"/>
</k:Stack>
<k:Stat label="Parcels" value="12"/>
</k:Stack>API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
columns | string | CSS grid columns, for example 2fr 1fr | |
row | boolean | false | Whether to lay items out side by side |
gap | int | 16 | Gap in pixels |
align | string | Cross-axis alignment using CSS align-items | |
justify | string | Main-axis alignment using CSS justify-content |
Aggregations
| Name | Type | Description |
|---|---|---|
content | sap.ui.core.Control[] | Controls to lay out |