1
1
import Layout from "@theme/Layout" ;
2
2
import styles from "./Contact.module.css" ;
3
3
import React , { useState , ChangeEvent , FormEvent } from "react" ;
4
+ import { motion } from "framer-motion" ;
4
5
5
6
interface FormValues {
6
7
fullName : string ;
@@ -46,15 +47,47 @@ export default function Contact(): JSX.Element {
46
47
< div className = { styles . main__contact_contains_left } >
47
48
< div className = { styles . main__contact_ud_wrapper } >
48
49
< div className = { styles . ud_contact_title } >
49
- < span className = { styles . contact_us } >
50
+ < motion . span
51
+ initial = { { opacity : 0 , x : - 150 } }
52
+ whileInView = { { opacity : 1 , x : 0 } }
53
+ viewport = { { once : true } }
54
+ transition = { {
55
+ duration : 1 ,
56
+ type : "spring" ,
57
+ stiffness : 100 ,
58
+ delay : 0.5 ,
59
+ } }
60
+ className = { styles . contact_us }
61
+ >
50
62
< b > CONTACT US</ b >
51
- </ span >
52
- < h2 className = { styles . contact_heading } >
63
+ </ motion . span >
64
+ < motion . h2
65
+ initial = { { opacity : 0 , x : - 150 } }
66
+ whileInView = { { opacity : 1 , x : 0 } }
67
+ viewport = { { once : true } }
68
+ transition = { {
69
+ duration : 1 ,
70
+ type : "spring" ,
71
+ stiffness : 100 ,
72
+ delay : 0.5 ,
73
+ } }
74
+ className = { styles . contact_heading }
75
+ >
53
76
Let's talk about your problem.
54
- </ h2 >
77
+ </ motion . h2 >
55
78
</ div >
56
79
< div className = { styles . contact_info } >
57
- < div className = { styles . contact_info_item } >
80
+ < motion . div
81
+ initial = { { opacity : 0 , y : 150 } }
82
+ whileInView = { { opacity : 1 , y : 0 } }
83
+ viewport = { { once : true } }
84
+ transition = { {
85
+ duration : 1 ,
86
+ type : "spring" ,
87
+ stiffness : 100 ,
88
+ delay : 0.5 ,
89
+ } }
90
+ className = { styles . contact_info_item } >
58
91
< div className = { styles . icon } >
59
92
< svg
60
93
width = "29"
@@ -72,8 +105,18 @@ export default function Contact(): JSX.Element {
72
105
Mandsaur, Madhya Pradesh, India - 458002
73
106
</ p >
74
107
</ div >
75
- </ div >
76
- < div className = { styles . contact_info_item } >
108
+ </ motion . div >
109
+ < motion . div
110
+ initial = { { opacity : 0 , y : 150 } }
111
+ whileInView = { { opacity : 1 , y : 0 } }
112
+ viewport = { { once : true } }
113
+ transition = { {
114
+ duration : 1 ,
115
+ type : "spring" ,
116
+ stiffness : 100 ,
117
+ delay : 0.5 ,
118
+ } }
119
+ className = { styles . contact_info_item } >
77
120
< div className = { styles . icon } >
78
121
< svg
79
122
width = "34"
@@ -90,11 +133,21 @@ export default function Contact(): JSX.Element {
90
133
ajaydhyangar49@gmail.com
91
134
</ p >
92
135
</ div >
93
- </ div >
136
+ </ motion . div >
94
137
</ div >
95
138
</ div >
96
139
</ div >
97
- < div className = { styles . main__contact_contains_right } >
140
+ < motion . div
141
+ initial = { { opacity : 0 , x : 150 } }
142
+ whileInView = { { opacity : 1 , x : 0 } }
143
+ viewport = { { once : true } }
144
+ transition = { {
145
+ duration : 1 ,
146
+ type : "spring" ,
147
+ stiffness : 100 ,
148
+ delay : 0.5 ,
149
+ } }
150
+ className = { styles . main__contact_contains_right } >
98
151
< div className = { styles . form_container } >
99
152
< h3 className = { styles . form_heading } > Send us a Message</ h3 >
100
153
< form onSubmit = { handleSubmit } >
@@ -157,7 +210,7 @@ export default function Contact(): JSX.Element {
157
210
</ div >
158
211
</ form >
159
212
</ div >
160
- </ div >
213
+ </ motion . div >
161
214
</ div >
162
215
</ div >
163
216
</ section >
0 commit comments