Composition
How a container shares the space it was given. Six primitives, each answering one question about where a child ends up.
-
Stacks And Spacing Stack is one-dimensional flow: children are placed along one axis, separated by a fixed gap, inside optional padding.
-
Grid Grid is track-based placement on two axes. You declare column and row tracks, then add children that occupy one or more slots.
-
Alignment Alignment answers one question: where does a child sit inside the space it was given, when it does not fill that space.
-
Distribution Distribution decides what happens to the space a stack has left over on its main axis once every child has been measured and every gap applied.
-
Groups Group places children in the same local region under one shared alignment policy.
-
Overlays And Badges Overlay places children in the same outer rectangle by snapping anchors.