Baktiyar Ablaikhan

Animated Shiny Text

Source
Magic UI ↗
Author
Magic UI
Licence
MIT

Loading…

A light sheen sweeps across muted text inside a badge.

Code

"use client";

import { ArrowRight } from "lucide-react";

import { cn } from "@/lib/utils";
import { AnimatedShinyText } from "@/lab/magicui/ui/animated-shiny-text";

export default function AnimatedShinyTextDemo() {
  return (
    <div className="relative z-10 flex h-full w-full items-center justify-center">
      <div
        className={cn(
          "group rounded-full border border-black/5 bg-neutral-100 text-base text-white transition-all ease-in hover:cursor-pointer hover:bg-neutral-200 dark:border-white/5 dark:bg-neutral-900 dark:hover:bg-neutral-800",
        )}
      >
        <AnimatedShinyText className="inline-flex items-center justify-center px-4 py-1 transition ease-out hover:text-neutral-600 hover:duration-300 hover:dark:text-neutral-400">
          <span>✨ Introducing Magic UI</span>
          <ArrowRight className="ml-1 size-3 transition-transform duration-300 ease-in-out group-hover:translate-x-0.5" />
        </AnimatedShinyText>
      </div>
    </div>
  );
}
Prompt

Build "Animated Shiny Text", a text animation. What it does: A light sheen sweeps across muted text inside a badge. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS, using lucide-react. It sits on a light background, in a 16:10 frame. Respect prefers-reduced-motion with a still state, pause work when the element is off screen, and keep it accessible. Original: https://magicui.design/docs/components/animated-shiny-text (Magic UI, MIT).