npm install @caustics/distortion-hover <script> import { DistortionHover } from '@caustics/distortion-hover'; </script> <DistortionHover preset="ripple" />
| Prop | Type | Default | Description |
|---|---|---|---|
| preset | string | "ripple" | Named preset. Overrides individual props when set. |
| speed | number | 1.0 | Animation speed multiplier. 0 = static. |
| intensity | number | 0.5 | Effect intensity. Range: 0–1. |
| colors | string[] | undefined | Override palette. Accepts hex, hsl, or CSS custom properties. |
| reducedMotion | 'pause' | 'static' | 'static' | Behavior when prefers-reduced-motion is active. |
| class | string | undefined | Additional CSS classes applied to the root element. |
caustics-distortion-hover/ ├── svelte/ DistortionHover.svelte · index.ts · types.ts ├── react/ DistortionHover.tsx · index.ts · types.ts ├── vanilla/ distortion-hover.ts · compiled .js ├── docs/ README.md · API.md · CHANGELOG.md ├── LICENSE.md MIT, commercial use included └── package.json
Distortion Hover renders images on a WebGL plane and applies a displacement map shader on cursor hover. The result is the liquid, organic distortion effect you see on Awwwards-winning agency and portfolio sites.
Uses Three.js or OGL under the hood. The displacement texture is configurable — choose from built-in patterns or supply your own.