feat: add FadeIn and TypingCursor utility components

This commit is contained in:
ashim-hq
2026-04-23 17:21:22 +08:00
parent 2260d696bc
commit d22e4c2596
2 changed files with 76 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"use client";
import { motion } from "framer-motion";
import type { ReactNode } from "react";
export function FadeIn({
children,
className,
delay = 0,
}: {
children: ReactNode;
className?: string;
delay?: number;
}) {
return (
<motion.div
initial={{ opacity: 0, y: 20 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: "-100px" }}
transition={{ duration: 0.5, delay, ease: "easeOut" }}
className={className}
>
{children}
</motion.div>
);
}