Skip to content

Layout

Layout components arrange and frame other views. Layout explains how they divide the space between their children.

  • Stack: VStack and HStack place children one after another along an axis.
  • ZStack: draws its children on top of each other.
  • Window: wraps the root view in the window background.
  • Box: a styled rectangle without children.
  • Spacer: an invisible, flexible gap that pushes its neighbors apart.
  • Card: a raised panel with rounded corners and an optional header.
  • Scroll View: VScroll and HScroll move content that does not fit.