Ripples spread from the pointer and warp the image beneath them.
Also known as: CursorRipplescursor ripplepointer ripple
Moves in browsers that support WebGPU
This device could not render the demo — showing a still
Code reflects the control values
React
// Renders only in browsers with WebGPU.
// /samples/… are this site’s sample files — point them at your own image or video.
import { Shader, CursorRipples, ImageTexture } from 'shaders/react'
export default function ShaderEffect() {
return (
<Shader style={{ width: '100%', height: 320 }} disableTelemetry>
<ImageTexture
objectFit="cover"
url="/samples/photo.jpg" />
<CursorRipples />
</Shader>
)
}
Vue
<!-- Renders only in browsers with WebGPU. -->
<!-- /samples/… are this site’s sample files — point them at your own image or video. -->
<script setup lang="ts">
import { Shader, CursorRipples, ImageTexture } from 'shaders/vue'
</script>
<template>
<Shader style="width: 100%; height: 320px" :disable-telemetry="true">
<ImageTexture
object-fit="cover"
url="/samples/photo.jpg"/>
<CursorRipples/>
</Shader>
</template>
Svelte
<!-- Renders only in browsers with WebGPU. -->
<!-- /samples/… are this site’s sample files — point them at your own image or video. -->
<script>
import { Shader, CursorRipples, ImageTexture } from 'shaders/svelte'
</script>
<Shader style="width: 100%; height: 320px" disableTelemetry>
<ImageTexture
objectFit="cover"
url="/samples/photo.jpg" />
<CursorRipples />
</Shader>
Solid
// Renders only in browsers with WebGPU.
// /samples/… are this site’s sample files — point them at your own image or video.
import { Shader, CursorRipples, ImageTexture } from 'shaders/solid'
export default function ShaderEffect() {
return (
<Shader style={{ width: '100%', height: '320px' }} disableTelemetry>
<ImageTexture
objectFit="cover"
url="/samples/photo.jpg" />
<CursorRipples />
</Shader>
)
}
JavaScript
// Renders only in browsers with WebGPU.
// /samples/… are this site’s sample files — point them at your own image or video.
// expects <canvas id="canvas" style="width:100%;height:320px"></canvas> on the page
import { createShader } from 'shaders/js'
const shader = await createShader(document.getElementById("canvas"), {
components: [
{
type: 'ImageTexture',
props: {
objectFit: 'cover',
url: '/samples/photo.jpg',
},
},
{
type: 'CursorRipples',
}
]
}, { disableTelemetry: true })
Props · CursorRipples
Changes apply to the demo above and to the code tabs. Descriptions come from the library registry (MIT).
Name
Value
Default
Range / options
Description
intensityIntensity
10
0 – 20 (step 0.1)
Strength of the ripple distortion
decayDecay
10
0 – 20 (step 0.1)
How quickly ripples fade (higher = faster)
radiusRadius
0.5
0.1 – 1 (step 0.1)
Radius of cursor influence
chromaticSplitChromatic Split
1
0 – 3 (step 0.1)
RGB channel separation along ripple edges
edgesEdges
stretch
stretch · transparent · mirror · wrap
How to handle edges when distortion pushes content out of bounds
Every component also takes blendMode · opacity · visible · maskSource/maskType · boundingBox · id
Circular ripples spread from the pointer and wobble the layer underneath. Like touching still water, the effect makes a photo or color field briefly undulate.
`intensity` controls distortion strength (default 10, range 0–20), `decay` controls how quickly ripples fade (default 10, range 0–20; higher is faster), and `radius` sets the affected area (default 0.5, range 0.1–1). `chromaticSplit` adds color separation at ripple edges (default 1, range 0–3).
This is an effect layer, so it needs pixels from an image, video, or shape beneath it. Pair it with a photo or broad color field; distortion and color splitting can make text hard to read.
When to use
Use it for pointer feedback on photo cards, a responsive hero image, or decoration on a broad color field. Avoid it where small text or static information must stay clear.