Cursor Ripples

커서 잔물결

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

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).

NameValueDefaultRange / optionsDescription
intensityIntensity100 – 20 (step 0.1)Strength of the ripple distortion
decayDecay100 – 20 (step 0.1)How quickly ripples fade (higher = faster)
radiusRadius0.50.1 – 1 (step 0.1)Radius of cursor influence
chromaticSplitChromatic Split10 – 3 (step 0.1)RGB channel separation along ripple edges
edgesEdgesstretchstretch · transparent · mirror · wrapHow 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.

Open as page ↗