Installation
Choose your framework. The registry installs one component file and its PixiJS dependency.
Installation unavailable
The preview is public, but its installable release is still being prepared.
The registry command writes the component to src/lib/components/ui/WaterRipple.svelte and installs its dependencies.
The registry command writes the component to src/components/ui/WaterRipple.tsx and installs its dependencies.
The registry command writes the component to src/components/ui/WaterRipple.vue and installs its dependencies.
The ripple brush is embedded as a data URL, so installation does not create a separate image file.
Overview
Water Ripple turns any image into an interactive surface, stamping soft expanding displacement waves wherever the pointer moves.
The bundled ripple brush is embedded directly in the generated component, while the displayed image remains an explicit source supplied by the consumer.
Basic usage
The shader fills its parent. Your layout decides whether that parent is a card, hero, or viewport.
- Give the component a resolved height through its class or parent container.
- Remote image sources must allow cross-origin image loading when served from another origin.
- Reduced-motion preferences pause the displacement animation without removing the source image.
Component API
Types below match the selected Svelte component.
Additional classes for the parent-sized root element.
- Type
string
URL or data URL of the image distorted by the ripple surface.
- Type
string- Range / values
Image URL or data URL
Controls how the source image is placed inside the canvas.
- Type
"cover" | "fit" | "stretch"- Default
"cover"- Range / values
cover, fit, stretch
Diameter of each ripple stamped along the pointer path.
- Type
number- Default
100- Range / values
40–240
Distance that each ripple displaces the source image.
- Type
number- Default
0.05- Range / values
0–0.15
Rotation added to each expanding ripple per frame.
- Type
number- Default
0.02- Range / values
0–0.1
How long each ripple remains visible before fading out.
- Type
number- Default
0.96- Range / values
0.9–0.99
Amount of the previous ripple scale retained each frame.
- Type
number- Default
0.982- Range / values
0.94–0.995
Scale added as each ripple expands away from its origin.
- Type
number- Default
0.108- Range / values
0.02–0.2
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
false
Enables pointer-driven effects when the shader supports them.
- Type
boolean- Default
true
Caps render resolution independently from the element size.
- Type
number- Default
2- Range / values
1–3
Scales GPU resolution without changing layout dimensions.
- Type
number- Default
1- Range / values
0.25–1
Runs after the shader is mounted successfully, including a WebGL fallback.
- Type
(backend: ShaderBackend) => void- Range / values
webgpu, webgl
Runs when automatic initialization changes the requested WebGPU backend to WebGL.
- Type
(backend: ShaderBackend, reason: string) => void- Range / values
webgl
Reports source-loading or renderer failures so the host application can decide how to recover.
- Type
(error: Error) => void
Exposes the imperative component lifecycle methods.
- Type
Component public instance- Range / values
pause, resume, reset, resize, destroy
Types below match the selected React component.
Additional classes for the parent-sized root element.
- Type
string
URL or data URL of the image distorted by the ripple surface.
- Type
string- Range / values
Image URL or data URL
Controls how the source image is placed inside the canvas.
- Type
"cover" | "fit" | "stretch"- Default
"cover"- Range / values
cover, fit, stretch
Diameter of each ripple stamped along the pointer path.
- Type
number- Default
100- Range / values
40–240
Distance that each ripple displaces the source image.
- Type
number- Default
0.05- Range / values
0–0.15
Rotation added to each expanding ripple per frame.
- Type
number- Default
0.02- Range / values
0–0.1
How long each ripple remains visible before fading out.
- Type
number- Default
0.96- Range / values
0.9–0.99
Amount of the previous ripple scale retained each frame.
- Type
number- Default
0.982- Range / values
0.94–0.995
Scale added as each ripple expands away from its origin.
- Type
number- Default
0.108- Range / values
0.02–0.2
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
false
Enables pointer-driven effects when the shader supports them.
- Type
boolean- Default
true
Caps render resolution independently from the element size.
- Type
number- Default
2- Range / values
1–3
Scales GPU resolution without changing layout dimensions.
- Type
number- Default
1- Range / values
0.25–1
Runs after the shader is mounted successfully, including a WebGL fallback.
- Type
(backend: ShaderBackend) => void- Range / values
webgpu, webgl
Runs when automatic initialization changes the requested WebGPU backend to WebGL.
- Type
(backend: ShaderBackend, reason: string) => void- Range / values
webgl
Reports source-loading or renderer failures so the host application can decide how to recover.
- Type
(error: Error) => void
Exposes the imperative component lifecycle methods.
- Type
WaterRippleHandle- Range / values
pause, resume, reset, resize, destroy
Types below match the selected Vue component.
Additional classes for the parent-sized root element.
- Type
string
URL or data URL of the image distorted by the ripple surface.
- Type
string- Range / values
Image URL or data URL
Controls how the source image is placed inside the canvas.
- Type
"cover" | "fit" | "stretch"- Default
"cover"- Range / values
cover, fit, stretch
Diameter of each ripple stamped along the pointer path.
- Type
number- Default
100- Range / values
40–240
Distance that each ripple displaces the source image.
- Type
number- Default
0.05- Range / values
0–0.15
Rotation added to each expanding ripple per frame.
- Type
number- Default
0.02- Range / values
0–0.1
How long each ripple remains visible before fading out.
- Type
number- Default
0.96- Range / values
0.9–0.99
Amount of the previous ripple scale retained each frame.
- Type
number- Default
0.982- Range / values
0.94–0.995
Scale added as each ripple expands away from its origin.
- Type
number- Default
0.108- Range / values
0.02–0.2
Stops the render loop while keeping the current frame visible.
- Type
boolean- Default
false
Enables pointer-driven effects when the shader supports them.
- Type
boolean- Default
true
Caps render resolution independently from the element size.
- Type
number- Default
2- Range / values
1–3
Scales GPU resolution without changing layout dimensions.
- Type
number- Default
1- Range / values
0.25–1
Runs after the shader is mounted successfully, including a WebGL fallback.
- Type
(backend: ShaderBackend) => void- Range / values
webgpu, webgl
Runs when automatic initialization changes the requested WebGPU backend to WebGL.
- Type
(backend: ShaderBackend, reason: string) => void- Range / values
webgl
Reports source-loading or renderer failures so the host application can decide how to recover.
- Type
(error: Error) => void
Exposes the imperative component lifecycle methods.
- Type
Component public instance- Range / values
pause, resume, reset, resize, destroy