Skip to content

Ripple Field

Concentric rings bloom from each pointer movement.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import RippleField from "./RippleField";
export default function Example() {
return (
<RippleField
children={"Make a ripple."}
color={"#cbb5e7"}
background={"#19151e"}
duration={1800}
size={360}
spacing={65}
maxRipples={8}
autoPlay={true}
minHeight={400}
style={{
"fontSize": 38,
"letterSpacing": "-.05em"
}}
/>
);
}

Using Ripple Field

Set size and duration to control how far each ring spreads and how long it remains visible.

Use maxRipples to limit overlapping rings and autoPlay for movement without pointer input. Place any foreground content in children.

Props

NameTypeRequiredDefaultDescription
colorstringNo"#cbb5e7"Colour of the concentric rings.
backgroundstringNo"#19151e"Container background colour.
durationnumberNo1800Ripple lifetime in milliseconds.
sizenumberNo360Maximum ripple diameter in pixels.
spacingnumberNo65Pointer travel before creating another ripple, in pixels.
maxRipplesnumberNo8Maximum simultaneous ripples, capped at 20.
autoPlaybooleanNofalseCreate ripples automatically while visible. Disabled by default.
childrenReactNodeNoundefinedOptional foreground content.
minHeightnumber | stringNo360Minimum height in pixels or a CSS length. The component can fill a taller parent.
classNamestringNo""Additional CSS classes, merged with the component styles.
styleCSSPropertiesNoundefinedInline styles for caller-defined sizing and visual overrides.

Related components

Lava Lamp

Backgrounds

Warm liquid forms merge and drift inside a softly lit glass lamp.

Helix Field

Backgrounds

Two strands of shaded particles rotate around fine connecting rungs.

Wave Lattice

Backgrounds

A fine perspective mesh drifts over a sculpted wave surface.

Kinetic Mobile

Backgrounds

Suspended discs, rings and counterweights sway on fine connecting rods.