@sudarshanaui/animated-otp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnimatedOTP.css +31 -0
- package/AnimatedOTP.jsx +10 -0
- package/README.md +11 -0
- package/index.js +1 -0
- package/package.json +8 -0
package/AnimatedOTP.css
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.otp-anim {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 12px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
input {
|
|
7
|
+
width: 50px;
|
|
8
|
+
height: 60px;
|
|
9
|
+
text-align: center;
|
|
10
|
+
font-size: 24px;
|
|
11
|
+
background: #f0f0f0;
|
|
12
|
+
border: 2px solid transparent;
|
|
13
|
+
border-radius: 12px;
|
|
14
|
+
outline: none;
|
|
15
|
+
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
|
16
|
+
color: #333;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
input:focus {
|
|
20
|
+
transform: translateY(-5px) scale(1.1);
|
|
21
|
+
border-color: #6200ea;
|
|
22
|
+
background: white;
|
|
23
|
+
box-shadow: 0 10px 20px rgba(98, 0, 234, 0.2);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes shake {
|
|
27
|
+
0%, 100%: [object Object];
|
|
28
|
+
20%, 60%: [object Object];
|
|
29
|
+
40%, 80%: [object Object];
|
|
30
|
+
}
|
|
31
|
+
|
package/AnimatedOTP.jsx
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './AnimatedOTP.css';
|
|
3
|
+
|
|
4
|
+
export const AnimatedOTP = (props) => {
|
|
5
|
+
return (
|
|
6
|
+
<>
|
|
7
|
+
<div className="otp-anim"><input type="text" maxlength="1" placeholder="•" /><input type="text" maxlength="1" placeholder="•" /><input type="text" maxlength="1" placeholder="•" /><input type="text" maxlength="1" placeholder="•" /></div>
|
|
8
|
+
</>
|
|
9
|
+
);
|
|
10
|
+
};
|
package/README.md
ADDED
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AnimatedOTP';
|