UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
🐛 fix: update shimmer
Dillion Verma38cc8195db37
diff --git a/registry/components/example/text-shimmer-demo.tsx b/registry/components/example/text-shimmer-demo.tsxindex 7a16a217..3bbc8734 100644--- a/registry/components/example/text-shimmer-demo.tsx+++ b/registry/components/example/text-shimmer-demo.tsx@@ -1,11 +1,22 @@+import { cn } from "@/lib/utils";import TextShimmer from "@/registry/components/magicui/text-shimmer";+import { ArrowRightIcon } from "@radix-ui/react-icons";export default async function TextShimmerDemo() {return (- <div className="relative flex h-full w-full max-w-[32rem] items-center justify-center overflow-hidden rounded-lg border bg-background p-8 shadow-2xl">- <TextShimmer className="text-center text-5xl font-semibold leading-none">- Text Shimmer- </TextShimmer>- </div>+ <div className="min-h-[16rem] items-center flex justify-center">+ <div+ className={cn(+ "rounded-full border dark:border-white/5 border-black/5 dark:bg-neutral-900 bg-neutral-100 text-base text-white transition-all ease-in hover:cursor-pointer dark:hover:bg-neutral-800 hover:bg-neutral-200",+ "group gap-1",+ "translate-y-[-1rem] animate-fade-in opacity-0",+ )}+ >+ <TextShimmer className="inline-flex items-center justify-center px-4 py-1">+ <span>✨ Introducing Magic UI</span>+ <ArrowRightIcon className="size-3 ml-1 transition-transform duration-300 ease-in-out group-hover:translate-x-0.5" />+ </TextShimmer>+ </div>+ </div>);}diff --git a/registry/components/magicui/text-shimmer.tsx b/registry/components/magicui/text-shimmer.tsxindex 71f834d9..960c328d 100644--- a/registry/components/magicui/text-shimmer.tsx+++ b/registry/components/magicui/text-shimmer.tsx@@ -20,13 +20,13 @@ const TextShimmer: FC<TextShimmerProps> = ({} as CSSProperties}className={cn(- "mx-auto max-w-md text-neutral-400/50 dark:text-neutral-600/50",+ "mx-auto max-w-md text-neutral-600/50 dark:text-neutral-400/50",// Shimmer effect"animate-shimmer bg-clip-text bg-no-repeat [background-position:0_0] [background-size:var(--shimmer-width)_100%] [transition:background-position_1s_cubic-bezier(.6,.6,0,1)_infinite]",// Shimmer gradient- "bg-gradient-to-r from-neutral-100 via-black via-50% to-neutral-100 dark:from-neutral-900 dark:via-white/80 dark:to-neutral-900",+ "bg-gradient-to-r from-neutral-100 via-black/80 via-50% to-neutral-100 dark:from-neutral-900 dark:via-white/80 dark:to-neutral-900",className,)}