Skip to content

Commit 98b00a2

Browse files
committed
🦄 Added: Cube Scroll Effect for Designations
1 parent 226c79a commit 98b00a2

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎world/effects/designations.tsx‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ import { useState, useEffect } from "react";
33

44
const Designations = ({ interval = 4000 }) => {
55
const words = [
6-
"Digital Artist",
7-
"Software Developer",
8-
"Web Developer",
96
"Graphic Designer",
10-
"Backend Developer",
7+
"Software Developer",
118
"Python Developer",
9+
"Digital Artist",
1210
"Software Engineer",
11+
"Backend Developer",
1312
"Full Stack Developer",
1413
];
1514
const [index, setIndex] = useState(0);
@@ -26,9 +25,9 @@ const Designations = ({ interval = 4000 }) => {
2625
<AnimatePresence>
2726
<motion.span
2827
key={index}
29-
initial={{ opacity: 0, y: "-50%" }}
30-
animate={{ opacity: 1, y: "0%" }}
31-
exit={{ opacity: 0, y: "50%" }}
28+
initial={{ opacity: 0, rotateX: -70, y: "-50%" }}
29+
animate={{ opacity: 1, rotateX: 0, y: "0%" }}
30+
exit={{ opacity: 0, rotateX: 70, y: "50%" }}
3231
transition={{ duration: 0.5 }}
3332
style={{ position: "absolute" }}
3433
>

0 commit comments

Comments
 (0)