Column

inline fun Column(alignContent: YogaAlign? = null, alignItems: YogaAlign? = null, justifyContent: YogaJustify? = null, wrap: YogaWrap? = null, isReversed: Boolean = false, gap: Dimen? = null, mainAxisGap: Dimen? = null, crossAxisGap: Dimen? = null, style: Style = Style, customSimpleName: String? = null, init: FlexboxScope.() -> Unit = {}): KColumn

Constructs a KColumn without requiring a com.facebook.litho.ComponentContext or com.facebook.litho.ResourcesScope.

Column(style = Style.padding(8.dp)) {
child(Text(text = "Hello"))
}

Parameters

alignContent

Defines how the lines of children are distributed along the cross-axis when there is extra space (only applies when wrap is enabled).

alignItems

Defines the default alignment for children along the cross-axis.

justifyContent

Defines how children are distributed along the main axis (vertical for Column).

wrap

Controls whether children wrap to multiple lines when they exceed the container's size.

isReversed

If true, reverses the order of children along the main axis (bottom-to-top instead of top-to-bottom).

gap

Specifies the spacing between children. Applied uniformly between all adjacent children in the container. Resolved to pixels at layout time.

mainAxisGap

Spacing between children along the main axis (vertical for Column). Takes precedence over gap if both are specified.

crossAxisGap

Spacing between wrapped lines along the cross axis (horizontal for Column). Only applies when wrap is enabled. Takes precedence over gap if both are specified.

style

The Style to apply to this Column for additional layout and visual properties.

customSimpleName

Overrides the component's Component.getSimpleName (defaults to "Column"). Preserves the debug/finder identity of legacy Column.create(c, name) call sites migrated onto this DSL; leave null for the standard "Column" name.

init

A lambda with FlexboxScope receiver for adding children to this Column using FlexboxScope.child.