"use client"; import { m, useInView } from "framer-motion"; import { useRef } from "react"; import { cn } from "@/lib/utils"; interface TextRevealProps { text: string; className?: string; delay?: number; once?: boolean; stagger?: number; } export function TextReveal({ text, className, delay = 0, once = true, stagger = 0.055, }: TextRevealProps) { const ref = useRef(null); const isInView = useInView(ref, { once, margin: "-60px" }); const words = text.split(" "); return ( {words.map((word, i) => ( {word} ))} ); }