MΓ³dulo 04 Β· Jetpack Compose: First Steps β LecciΓ³n 2 de 4 Β· ~11 min
Rows, Columns & Boxes
Three containers, all of layout
One Text on the screen won't get you far. Compose's layout system is built on three container composables, each arranging whatever children you give it:
Columnβ stacks children vertically, top to bottom.Rowβ lines children up horizontally, left to right.Boxβ layers children on top of each other; later children draw over earlier ones.
You nest them to build real screens: a screen is often a Column of rows, each row a Row of an icon and some text. Sound familiar? Column is Compose's VStack, Row is its HStack, Box is its ZStack β same three shapes, different names.
Both Row and Column take horizontalArrangement/verticalArrangement (spacing and grouping along the main axis) and horizontalAlignment/verticalAlignment (how children line up on the cross axis).