Layout
Layout components arrange and frame other views. Layout explains how they divide the space between their children.
- Stack:
VStackandHStackplace 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:
VScrollandHScrollmove content that does not fit.