Parameters
A single child component or an array of child components to overlay.
Configuration options for the depth stack.
A view that overlays its children, aligned in both axes.
ZStack(children: Component): Component;
ZStack(children: Component[]): Component;
ZStack(props: { alignment?: Alignment }, children: Component[]): Component;
ZStack([
Rectangle().fill(Color("blue")),
Text("Overlay text")
])
ZStack({ alignment: "center" }, [
Circle()
.fill(Color("gray")
.opacity(0.3))
.frame({ width: 100, height: 100 }),
Text("42")
.font("largeTitle")
.bold()
])