From 0030b04817995b5e6e104c41690ed9e6ee212130 Mon Sep 17 00:00:00 2001 From: dancrump1 Date: Fri, 24 Jan 2025 11:19:57 -0500 Subject: [PATCH] fix: add once prop on text-animate Add viewport prop to MotionComponent --- registry/default/magicui/text-animate.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/registry/default/magicui/text-animate.tsx b/registry/default/magicui/text-animate.tsx index 4fe17cd4b..4ef184033 100644 --- a/registry/default/magicui/text-animate.tsx +++ b/registry/default/magicui/text-animate.tsx @@ -365,6 +365,7 @@ export function TextAnimate({ animate={startOnView ? undefined : "show"} exit="exit" className={cn("whitespace-pre-wrap", className)} + viewport={{ once }} {...props} > {segments.map((segment, i) => ( @@ -374,7 +375,7 @@ export function TextAnimate({ custom={i * staggerTimings[by]} className={cn( by === "line" ? "block" : "inline-block whitespace-pre", - segmentClassName, + segmentClassName )} > {segment}