Shiny Button
- Source
- Magic UI ↗
- Author
- Magic UI
- Licence
- MIT
Loading…
A highlight sweeps across the label on a loop; the button springs on press.
Code
"use client";
import { ShinyButton } from "@/lab/magicui/ui/shiny-button";
export default function ShinyButtonDemo() {
return (
<div className="relative flex h-full w-full items-center justify-center">
<ShinyButton>Shiny Button</ShinyButton>
</div>
);
}
Prompt
Build "Shiny Button", a button animation. What it does: A highlight sweeps across the label on a loop; the button springs on press. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS, using motion. Technique: the Motion library. 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/shiny-button (Magic UI, MIT).