UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: update demos for many components
Dillion Verma84dcd0bcc63d
diff --git a/registry/components/example/border-beam-demo-2.tsx b/registry/components/example/border-beam-demo-2.tsxnew file mode 100644index 00000000..0928eb6d--- /dev/null+++ b/registry/components/example/border-beam-demo-2.tsx@@ -0,0 +1,20 @@+import { BorderBeam } from "@/components/magicui/border-beam";++export default function BorderBeamDemo() {+ return (+ <div className="relative rounded-xl">+ <img+ src="/placeholder-dark.svg"+ alt="Hero Image"+ className="dark:block rounded-[inherit] border size-full mx-auto aspect-video overflow-hidden rounded-xl object-cover object-center shadow-lg hidden"+ />+ <img+ src="/placeholder.svg"+ alt="Hero Image"+ className="block rounded-[inherit] border size-full mx-auto aspect-video overflow-hidden rounded-xl object-cover object-center shadow-lg dark:hidden"+ />++ <BorderBeam size={250} duration={12} delay={9} />+ </div>+ );+}diff --git a/registry/components/example/border-beam-demo.tsx b/registry/components/example/border-beam-demo.tsxindex 0928eb6d..6669dfaa 100644--- a/registry/components/example/border-beam-demo.tsx+++ b/registry/components/example/border-beam-demo.tsx@@ -2,18 +2,10 @@ import { BorderBeam } from "@/components/magicui/border-beam";export default function BorderBeamDemo() {return (- <div className="relative rounded-xl">- <img- src="/placeholder-dark.svg"- alt="Hero Image"- className="dark:block rounded-[inherit] border size-full mx-auto aspect-video overflow-hidden rounded-xl object-cover object-center shadow-lg hidden"- />- <img- src="/placeholder.svg"- alt="Hero Image"- className="block rounded-[inherit] border size-full mx-auto aspect-video overflow-hidden rounded-xl object-cover object-center shadow-lg dark:hidden"- />-+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl">+ <span className="pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10">+ Border Beam+ </span><BorderBeam size={250} duration={12} delay={9} /></div>);diff --git a/registry/components/example/confetti-demo.tsx b/registry/components/example/confetti-demo.tsxindex 15fd8bbc..2c706305 100644--- a/registry/components/example/confetti-demo.tsx+++ b/registry/components/example/confetti-demo.tsx@@ -9,7 +9,7 @@ export default function ConfettiDemo() {const confettiRef = useRef<ConfettiRef>(null);return (- <div className="relative flex h-[500px] w-full max-w-lg flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"><span className="pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10">Confetti</span>diff --git a/registry/components/example/dock-demo.tsx b/registry/components/example/dock-demo.tsxindex 6145ac71..c81ef89d 100644--- a/registry/components/example/dock-demo.tsx+++ b/registry/components/example/dock-demo.tsx@@ -6,7 +6,7 @@ export type IconProps = React.HTMLAttributes<SVGElement>;export default function DockDemo() {return (- <div className="relative flex h-[300px] w-full max-w-lg flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"><span className="pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10">Dock</span>diff --git a/registry/components/example/dot-pattern-demo.tsx b/registry/components/example/dot-pattern-demo.tsxindex 6287e7b0..c46ce097 100644--- a/registry/components/example/dot-pattern-demo.tsx+++ b/registry/components/example/dot-pattern-demo.tsx@@ -3,19 +3,17 @@import { cn } from "@/lib/utils";import DotPattern from "@/components/magicui/dot-pattern";-const DotPatternDemo = () => {+export default function DotPatternDemo() {return (- <div className="relative flex h-full w-full max-w-[32rem] items-center justify-center overflow-hidden rounded-lg border bg-background p-20 md:shadow-xl">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Dot Pattern</p><DotPatternclassName={cn(- "[mask-image:radial-gradient(200px_circle_at_center,white,transparent)]",+ "[mask-image:radial-gradient(300px_circle_at_center,white,transparent)]",)}/></div>);-};--export default DotPatternDemo;+}diff --git a/registry/components/example/grid-pattern-demo.tsx b/registry/components/example/grid-pattern-demo.tsxindex 4de0564e..c60c1fa7 100644--- a/registry/components/example/grid-pattern-demo.tsx+++ b/registry/components/example/grid-pattern-demo.tsx@@ -3,9 +3,9 @@import { cn } from "@/lib/utils";import GridPattern from "@/components/magicui/grid-pattern";-const GridPatternDemo = () => {+export default function GridPatternDemo() {return (- <div className="relative flex h-full w-full max-w-[32rem] items-center justify-center overflow-hidden rounded-lg border bg-background p-20 md:shadow-xl ">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">Grid Pattern</p>@@ -14,17 +14,21 @@ const GridPatternDemo = () => {[4, 4],[5, 1],[8, 2],- [6, 6],- [10, 5],- [13, 3],+ [5, 3],+ [5, 5],+ [10, 10],+ [12, 15],+ [15, 10],+ [10, 15],+ [15, 10],+ [10, 15],+ [15, 10],]}className={cn(- "[mask-image:radial-gradient(200px_circle_at_center,white,transparent)]",+ "[mask-image:radial-gradient(400px_circle_at_center,white,transparent)]","inset-x-0 inset-y-[-30%] h-[200%] skew-y-12",)}/></div>);-};--export default GridPatternDemo;+}diff --git a/registry/components/example/marquee-demo.tsx b/registry/components/example/marquee-demo.tsxindex d0bea9bd..e12dd842 100644--- a/registry/components/example/marquee-demo.tsx+++ b/registry/components/example/marquee-demo.tsx@@ -78,9 +78,9 @@ const ReviewCard = ({);};-const MarqueeDemo = () => {+export default function MarqueeDemo() {return (- <div className="relative flex h-full w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background py-20 md:shadow-xl">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"><Marquee pauseOnHover className="[--duration:20s]">{firstRow.map((review) => (<ReviewCard key={review.username} {...review} />@@ -95,6 +95,4 @@ const MarqueeDemo = () => {<div className="pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-white dark:from-background"></div></div>);-};--export default MarqueeDemo;+}diff --git a/registry/components/example/meteors-demo.tsx b/registry/components/example/meteors-demo.tsxindex 0993f208..b7f7d128 100644--- a/registry/components/example/meteors-demo.tsx+++ b/registry/components/example/meteors-demo.tsx@@ -2,11 +2,11 @@ import Meteors from "@/components/magicui/meteors";export default function MeteorDemo() {return (- <div className="relative flex h-full w-full max-w-[32rem] items-center justify-center overflow-hidden rounded-lg border bg-background p-20 md:shadow-xl">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"><Meteors number={30} />- <p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-black dark:text-white">+ <span className="pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10">Meteors- </p>+ </span></div>);}diff --git a/registry/components/example/orbiting-circles-demo.tsx b/registry/components/example/orbiting-circles-demo.tsxindex 45ffb7d3..d905650a 100644--- a/registry/components/example/orbiting-circles-demo.tsx+++ b/registry/components/example/orbiting-circles-demo.tsx@@ -2,7 +2,7 @@ import OrbitingCircles from "@/components/magicui/orbiting-circles";export default function OrbitingCirclesDemo() {return (- <div className="relative flex h-[500px] w-full max-w-lg items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"><span className="pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-black">Circles</span>diff --git a/registry/components/example/particles-demo.tsx b/registry/components/example/particles-demo.tsxindex b6bd3c81..b4085d26 100644--- a/registry/components/example/particles-demo.tsx+++ b/registry/components/example/particles-demo.tsx@@ -14,8 +14,8 @@ const ParticlesDemo = () => {}, [theme]);return (- <div className="relative flex h-[400px] w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-4 md:shadow-xl">- <span className="pointer-events-none z-10 whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-7xl font-semibold leading-none text-transparent dark:from-white dark:to-black md:text-9xl">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl">+ <span className="pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10">Particles</span><Particlesdiff --git a/registry/components/example/retro-grid-demo.tsx b/registry/components/example/retro-grid-demo.tsxindex 29387000..13a14194 100644--- a/registry/components/example/retro-grid-demo.tsx+++ b/registry/components/example/retro-grid-demo.tsx@@ -2,9 +2,9 @@import RetroGrid from "@/components/magicui/retro-grid";-const RetroGridDemo = () => {+export default function RetroGridDemo() {return (- <div className="relative flex h-full w-full max-w-[32rem] items-center justify-center overflow-hidden rounded-lg border bg-background p-20 md:shadow-xl">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"><span className="pointer-events-none z-10 whitespace-pre-wrap bg-gradient-to-b from-[#ffd319] via-[#ff2975] to-[#8c1eff] bg-clip-text text-center text-7xl font-bold leading-none tracking-tighter text-transparent">Retro Grid</span>@@ -12,6 +12,4 @@ const RetroGridDemo = () => {<RetroGrid /></div>);-};--export default RetroGridDemo;+}diff --git a/registry/components/example/ripple-demo.tsx b/registry/components/example/ripple-demo.tsxindex c578dbdd..7bfa610f 100644--- a/registry/components/example/ripple-demo.tsx+++ b/registry/components/example/ripple-demo.tsx@@ -1,14 +1,12 @@import Ripple from "@/components/magicui/ripple";-const RippleDemo = () => {+export default function RippleDemo() {return (- <div className="relative flex h-full w-full max-w-[32rem] items-center justify-center overflow-hidden rounded-lg border bg-background p-20 md:shadow-xl">+ <div className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"><p className="z-10 whitespace-pre-wrap text-center text-5xl font-medium tracking-tighter text-white">Ripple</p><Ripple /></div>);-};--export default RippleDemo;+}diff --git a/registry/components/example/shine-border-demo.tsx b/registry/components/example/shine-border-demo.tsxindex f65e725d..dcc24244 100644--- a/registry/components/example/shine-border-demo.tsx+++ b/registry/components/example/shine-border-demo.tsx@@ -3,10 +3,12 @@ import ShineBorder from "@/components/magicui/shine-border";export default function ShineBorderDemo() {return (<ShineBorder- className="text-center text-2xl font-bold capitalize"+ className="relative flex h-[500px] w-full flex-col items-center justify-center overflow-hidden rounded-lg border bg-background md:shadow-xl"color={["#A07CFE", "#FE8FB5", "#FFBE7B"]}>- Shine Border+ <span className="pointer-events-none whitespace-pre-wrap bg-gradient-to-b from-black to-gray-300/80 bg-clip-text text-center text-8xl font-semibold leading-none text-transparent dark:from-white dark:to-slate-900/10">+ Shine Border+ </span></ShineBorder>);}diff --git a/registry/components/magicui/shine-border.tsx b/registry/components/magicui/shine-border.tsxindex 08dd41f2..2b5c240d 100644--- a/registry/components/magicui/shine-border.tsx+++ b/registry/components/magicui/shine-border.tsx@@ -48,7 +48,6 @@ export default function ShineBorder({{"--border-width": `${borderWidth}px`,"--border-radius": `${borderRadius}px`,- "--border-radius-child": `${borderRadius * 0.2}px`,"--shine-pulse-duration": `${duration}s`,"--mask-linear-gradient": `linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,"--background-radial-gradient": `radial-gradient(transparent,transparent, ${color instanceof Array ? color.join(",") : color},transparent,transparent)`,@@ -56,9 +55,7 @@ export default function ShineBorder({}className={`before:bg-shine-size before:absolute before:inset-0 before:aspect-square before:size-full before:rounded-[--border-radius] before:p-[--border-width] before:will-change-[background-position] before:content-[""] before:![-webkit-mask-composite:xor] before:![mask-composite:exclude] before:[background-image:--background-radial-gradient] before:[background-size:300%_300%] before:[mask:--mask-linear-gradient] motion-safe:before:animate-[shine-pulse_var(--shine-pulse-duration)_infinite_linear]`}></div>- <div className={"z-[1] size-full rounded-[--border-radius-child]"}>- {children}- </div>+ {children}</div>);}