0PricingLogin
Jetpack Compose Academy · Lesson

Box: Layer & Overlap

Stack content with alignment control.

Stacking on Top

When children should overlap rather than line up, you use a Box. It layers content on the same spot. 🗂️

Your First Box

A Box draws its children in order, each one on top of the previous. Later children sit above earlier ones, like stacked cards.

Box {
    Image(painter, null)
    Text("Caption")
}

All lessons in this course

  1. Column: Stack Things Vertically
  2. Row: Place Things Side by Side
  3. Box: Layer & Overlap
  4. Arrangement & Alignment
← Back to Jetpack Compose Academy