Glass Reveal

A pointer-following glass lens that refracts one image through another, with square, circle, blob and rippling portal outlines

Customize

Size
0.60
Softness
0.00
Distortion
1.00
Aberration
0.010
Wobble
0.50
Wobble Speed
2.0
Wave Frequency
6
Wave Strength
0.010
Wave Speed
1.0
Grain
0.020
Grain Speed
10
Grayscale
1.00
Dim
0.00
Follow
0.85
Fallback

Props

23
imagestring

Photo shown in full colour inside the lens.

DefaultUnsplash URL
backgroundImagestring

Optional different photo for the outside. Defaults to the same image.

Defaultimage
shape"square" | "circle" | "blob" | "portal"

Outline of the lens. Portal is an organic blob whose edge dissolves into the outside.

Default"circle"
sizenumber

Lens size as a fraction of the shorter container edge.

Default0.6
softnessnumber

Edge feather in lens units. 0 keeps a crisp cut. Portal adds its own wide falloff.

Default0
distortionnumber

Radial lens warp inside the outline. Positive magnifies like glass, negative pinches.

Default1
aberrationnumber

Colour fringing that grows towards the lens edge.

Default0.01
wobblenumber

How far the blob and portal outlines wobble, 0 to 1.

Default0.5
wobbleSpeednumber

Speed of the outline wobble.

Default2
waveFrequencynumber

Frequency of the sine wave rolling through the outside image.

Default6
waveStrengthnumber

Displacement of the outside wave.

Default0.01
waveSpeednumber

Speed of the outside wave.

Default1
grainnumber

Displacement of the animated grain outside the lens.

Default0.02
grainSpeednumber

How fast the grain flickers.

Default10
grayscalenumber

How far the outside is drained of colour, 0 to 1.

Default1
dimnumber

How far the outside is darkened, 0 to 1.

Default0
follownumber

Pointer damping. 0 snaps to the pointer, 1 trails far behind.

Default0.85
returnToCenterboolean

Drift the lens back to the centre when the pointer leaves.

Defaulttrue
fallbackColorstring

Colour shown while the image loads or if it fails to load.

Default"#171717"
pausedboolean

Freeze the wave, grain and outline animation.

Defaultfalse
dprnumber

Upper device pixel ratio bound for the canvas.

Default1.5
classNamestring

Classes applied to the root element.

Default—
childrenReactNode

Content layered above the effect.

Default—