ZeroGravity UI

Backgroundsstable

Wake

Water ripple

Water over a floor: the pointer pushes waves that spread, interfere and bend what lies underneath.

Customize

Waterhow the pointer pushes it and how long it keeps moving
0.60strength
14radius
2.40decay
Surfacewhat lies underneath, and how the water bends and lights it
surface
1.00refraction
1.00light
pixelated

Usage

TSX
import { Wake } from "zerogravity/wake"

<Wake>
    <Content />
</Wake>

Generated from the controls above. Only props that differ from their defaults are shown.

Props

12 documented props on Wake
PropertyTypeDefaultDescription
strengthnumber0.6Strength. Range 0 to 1.
radiusnumber14Radius. Range 4 to 40.
decaynumber2.4Decay. Range 0.5 to 6.
surface"tiles" | "grid" | "checker""tiles"Surface.
refractionnumber1Refraction. Range 0 to 3.
lightnumber1Light. Range 0 to 3.
pixelatedbooleanfalsePixelated.
childrenReactNode—Content above the water. Stays crisp and interactive.
srcstring—An image to lay under the water, cover-fitted. Falls back to surface.
enableOnTouchbooleantrueAnswer a finger: a tap drops a ripple, a sideways drag leaves a wake. Vertical scrolling and pinch-zoom still work.
disabledbooleanfalseHolds one still, refracted frame instead of animating.
respectReducedMotionbooleantrueUnder prefers-reduced-motion, show the still frame.

Dependencies

0 external runtime dependencies

Ships with nothing but React.