feat: premium polish pass — typing effect, animated counters, ambient orbs, input glow, show/hide password, redesigned settings, Reveal animations
- Add TypewriterText component for hero heading animation - Add AnimatedCounter with scroll-triggered count-up - Add AmbientOrbs with floating gradient orbs in hero - Add input-glow focus effect, btn-shine hover effect CSS - Add show/hide password toggle on login, register, and home login forms - Redesign settings page with premium gradient cards and icon headers - Polish /me dashboard with Reveal animations, btn-shine, input-glow - Add animate-count CSS keyframe
This commit is contained in:
1 parent
5fa342018d
commit
b37b6bc2b9
10 files changed
+569
-150
No files matched your search
@@ -0,0 +1,42 @@
|
||||
"use client";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export function TypewriterText({
|
||||
text,
|
||||
className,
|
||||
}: {
|
||||
text: string;
|
||||
className?: string;
|
||||
}) {
|
||||
const [displayed, setDisplayed] = useState("");
|
||||
const [done, setDone] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setDisplayed("");
|
||||
setDone(false);
|
||||
let i = 0;
|
||||
const id = setInterval(() => {
|
||||
if (i < text.length) {
|
||||
setDisplayed(text.slice(0, i + 1));
|
||||
i++;
|
||||
} else {
|
||||
clearInterval(id);
|
||||
setDone(true);
|
||||
}
|
||||
}, 40);
|
||||
return () => clearInterval(id);
|
||||
}, [text]);
|
||||
|
||||
return (
|
||||
<motion.span
|
||||
className={`${className ?? ""} ${!done ? "typing-cursor" : ""}`}
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
transition={{ duration: 0.3 }}
|
||||
>
|
||||
{displayed}
|
||||
</motion.span>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user