Components
Loading preview...
An animated ripple effect typically used behind elements to emphasize them. Add the following animations to your tailwind.config.js file: extend: { animation: { ripple: "ripple var(--duration,2s) ease calc(var(--i, 0)*.2s) infinite", }, keyframes: { ripple: { "0%, 100%": { transform: "translate(-50%, -50%) scale(1)", }, "50%": { transform: "translate(-50%, -50%) scale(0.9)", }, }, }, },
npx shadcn@latest add https://21st.dev/r/dillionverma/rippleimport { Ripple } from "@/components/ui/ripple";
export function RippleDemo() {
return (
<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>
);
}