struct ContentView: View {
   @State private var boxScale: CGFloat = 1
   @State private var roundCorners: Bool = false

   var body: some View {
      VStack {
         HStack {
            Rectangle()
               .fill(Color.blue)
               .frame(width: 50, height: 50)
               .clipShape(RoundedRectangle(cornerRadius: roundCorners ? 15 : 0))
               .scaleEffect(boxScale)
         }.frame(width: 250, height: 120)
         Button("Animate") {
            withAnimation(.easeInOut(duration: 2)) {
               boxScale = 2
               roundCorners = true
            }
         }.buttonStyle(.glassProminent)
      }.padding()
   }
}