A WebGL image transition that sends a noisy refractive wave across nature photos, with chromatic edges, glow, pinch, autoplay, and click-triggered origins.
pnpm dlx shadcn@latest add @componentry/ripple-transitionDependencies: framer-motion clsx tailwind-merge
import { RippleTransition } from "@/components/ui/ripple-transition"
const images = [
"https://images.unsplash.com/photo-1511497584788-876760111969?auto=format&fit=crop&q=85&w=1800",
"https://images.unsplash.com/photo-1473773508845-188df298d2d1?auto=format&fit=crop&q=85&w=1800",
"https://images.unsplash.com/photo-1502082553048-f009c37129b9?auto=format&fit=crop&q=85&w=1800",
]
<RippleTransition
images={images}
className="h-[520px] w-full"
autoPlay
autoPlayInterval={3200}
autoPlayOrigin="random"
duration={1.4}
pinch
/>| Prop | Type | Default |
|---|---|---|
images | readonly string[]Image URLs to transition through. Use at least two for swaps. | nature images |
duration | numberTransition duration in seconds. | 1.4 |
ease | EasingFramer Motion easing curve for the transition progress. | "easeInOut" |
autoPlay | booleanAutomatically trigger image transitions. | false |
autoPlayInterval | numberDelay between automatic transitions in milliseconds. | 3200 |
autoPlayOrigin | "center" | "random"Ripple origin used for autoplay transitions. | "center" |
waveSpeed | numberSpeed of the expanding wavefront. | 1.6 |
sigma | numberThickness of the primary ripple band. | 0.15 |
waveFreq | numberFrequency of the smaller concentric ripple lines. | 5 |
pushAmt | numberRadial displacement strength applied by the wave. | 0.145 |
caStrength | numberChromatic aberration amount near the ripple edge. | 0.02 |
glow | numberBrightness lift along the wavefront. | 0.73 |
noiseWarp | numberOrganic noise applied to the transition boundary. | 1 |
pinch | booleanAdds a subtle inward pull at the ripple origin. | false |
borderRadius | numberRoot border radius in pixels. | 24 |
className | stringAdditional classes for the root container. | — |
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.