Column
A container directive that holds general markup content describing a column with a row in a grid-based layout.
Declaration
@Column(size: Int = 1, alignment: Alignment = leading) {
...
}Parameters
- size:
The size of this column. (optional)
Specify a value greater than
1to make this column span multiple columns in the parent Row. - alignment:
The alignment of this column’s content. (optional)
leadingAlign to the leading edge.
centerAlign to the center.
trailingAlign to the trailing edge.
Overview
Create a column inside a Row by nesting a @Column directive within the content for an @Row directive. Use size to span multiple columns and alignment to control content positioning.
@Row {
@Column {
Default (leading) alignment
}
@Column(alignment: center) {
Centered content
}
@Column(size: 2, alignment: trailing) {
Trailing alignment; twice as wide
}
}