position

inline fun Style.position(all: Dimen? = null, horizontal: Dimen? = null, vertical: Dimen? = null, start: Dimen? = null, top: Dimen? = null, end: Dimen? = null, bottom: Dimen? = null, left: Dimen? = null, right: Dimen? = null): Style

Used in conjunction with positionType to define how a component should be positioned in its parent.

For positionType of ABSOLUTE: the values specified here will define how inset the child is from the same edge on its parent. E.g. for position(0.px, 0.px, 0.px, 0.px), it will be the full size of the parent (no insets). For position(0.px, 10.px, 0.px, 10.px), the child will be the full width of the parent, but inset by 10px on the top and bottom.

For positionType of RELATIVE: the values specified here will define how the child is positioned relative to where that edge would have normally been positioned.

See https://yogalayout.dev/ for a web-based playground for trying out flexbox layouts.