Sitewright

Ripple distortion

A picture seen through water: pointer movement, clicks and taps send rings across it that bend and split the light.

What it is for

Hero image or feature visual; pass src for your picture (fills its parent), or leave it out for the built-in pattern.

Use it

1 · site.json
"effects": { "components": ["ripple-distortion"] }
or on the command line
node ~/.claude/skills/sitewright/scripts/scaffold.mjs --config site.json --out ./my-site --components ripple-distortion
2 · import it
import { RippleDistortion } from '@/components/fx/ui';

Files

  • components/fx/ui/RippleDistortion.tsx
  • components/fx/ui/_t1.ts
  • components/fx/ui/_motion-gl-tex.ts
  • ui-ripple-distortion.css styles

Source

Original to Sitewright. MIT licensed.

Credits and licences: third-party notices.

Accessibility

  • Keyboard. Components in the kit are written to be reached and used with the keyboard. Try it: press Tab inside the preview.
  • Reduced motion. With prefers-reduced-motion on, animation settles to its finished state at once.
  • Touch. Pointer-follow effects are skipped on touch screens; controls stay finger-sized.