Parameters
The component to display as an overlay on top of this view.
Configuration object for the overlay positioning.
Layers the given view on top of this view at the specified alignment.
.overlay(content: Component): Component;
.overlay(props: { alignment: Alignment }, content: Component): Component;
Rectangle()
.fill(Color("blue"))
.frame(200, 150)
.overlay(Text("Centered text"))
Rectangle()
.fill(Color("gray"))
.frame(300, 200)
.overlay(
{ alignment: "topLeading" },
Text("Top-left")
)