Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

change: fixing the undefined linear gradient error on animated-beam component by setting initial

Arghya Das03e68de65031
diff --git a/registry/components/magicui/animated-beam.tsx b/registry/components/magicui/animated-beam.tsx
index 3294c140..50bdbf15 100644
--- a/registry/components/magicui/animated-beam.tsx
+++ b/registry/components/magicui/animated-beam.tsx
@@ -152,6 +152,12 @@ export const AnimatedBeam: React.FC<AnimatedBeamProps> = ({
className="transform-gpu"
id={id}
gradientUnits={"userSpaceOnUse"}
+ initial={{
+ x1: "0%",
+ x2: "0%",
+ y1: "0%",
+ y2: "0%",
+ }}
animate={{
x1: gradientCoordinates.x1,
x2: gradientCoordinates.x2,