Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Layers content on top of a component.
.overlay(content: Component): Component .overlay(props: { alignment: Alignment }, content: Component): Component
Show properties
Circle() .frame({ width: 100, height: 100 }) .foregroundStyle(Color("blue")) .overlay( Text("A") .foregroundStyle(Color("white")) .font("title") )
Image({ url: "photo.jpg" }) .frame({ width: 200, height: 200 }) .overlay( { alignment: "bottomTrailing" }, Circle() .frame({ width: 24, height: 24 }) .foregroundStyle(Color("red")) .overlay( Text("3") .font("caption2") .foregroundStyle(Color("white")) ) .padding(8) )
Image({ systemName: "bell.fill" }) .font("title") .overlay( { alignment: "topTrailing" }, Text("5") .font("caption2") .foregroundStyle(Color("white")) .padding(4) .background(Color("red")) .clipShape(Circle()) .offset({ x: 6, y: -6 }) )