I wanted to create something like below image.
I tried applying the shadow on inner side but it is not working

Below is the code i tried :
ZStack(alignment: .leading) {
RoundedRectangle(cornerRadius: 10).frame(width: 150, height: 10)
.foregroundColor(.accentBG).overlay(Color.screenBG.opacity(0.5)).cornerRadius(10)
.overlay(
Rectangle()
.stroke(Color.shadowColor, lineWidth: 2)
.cornerRadius(10)
.offset(x: 2, y: 2)
.clipped()
)
}

