Ripple Button
- Source
- Magic UI ↗
- Author
- Magic UI
- Licence
- MIT
Loading…
Clicking sends a ripple out from the exact point of the click.
Code
"use client";
import { RippleButton } from "@/lab/magicui/ui/ripple-button";
export default function RippleButtonDemo() {
return (
<div className="relative flex h-full w-full items-center justify-center">
<RippleButton rippleColor="#ADD8E6">Click me</RippleButton>
</div>
);
}
Prompt
Build "Ripple Button", a button animation. What it does: Clicking sends a ripple out from the exact point of the click. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS. 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/ripple-button (Magic UI, MIT).