RoundedRectangle(cornerRadius: 20, style: .continuous)
    .frame(width: 300, height: 240)


RoundedRectangle(cornerRadius: 20, style: .continuous)
    .frame(width: 150, height: 400)
    .foregroundStyle(LinearGradient(gradient: Gradient(colors: [Color(.blue), Color(.gray)]), startPoint: .top, endPoint: .bottom))
    .rotationEffect(.degrees(rotation))
    .mask {
        RoundedRectangle(cornerRadius: 20, style: .continuous)
            .stroke(lineWidth: 7)
            .frame(width: 296, height: 236)
    }

 

ytw_developer