Pixel Reveal

An image that reveals itself through a sweep of pixels

pixel-reveal-tw

Customize

Image & Geometry

20
0.2
#ffffff

Animation

1.6

Trigger

Props

imageSrcstring

Image URL to reveal (required)

Default:""
widthstring | number

Container width

Default:"100%"
heightstring | number

Container height

Default:"100%"
gridSizenumber

Approximate pixel size of each dissolving cell — lower means a denser grid (4–80)

Default:20
transitionColorstring

Hex color of the dissolving pixel squares

Default:"#242424"
edgeHeightnumber

Thickness of the noisy leading edge as a fraction of the axis (0.05–0.6)

Default:0.2
durationnumber

Total reveal duration in seconds (0.2–6)

Default:1.6
easing"linear" | "easeIn" | "easeOut" | "easeInOut"

Easing curve applied to the progress ramp

Default:"linear"
direction"up" | "down" | "left" | "right"

Axis along which the reveal sweeps

Default:"up"
autoTriggerboolean

Auto-fire the reveal when the container intersects the viewport

Default:true
triggerOnceboolean

Only auto-trigger on the first viewport entry; otherwise replay each time it re-enters

Default:false
triggerThresholdnumber

Intersection ratio that fires the auto-trigger (0–1)

Default:0
pausedboolean

Freeze the animation in place

Default:false
borderRadiusstring | number

Border radius applied to the container

Default:"0px"
classNamestring

Additional CSS classes for the container

Default:""
childrenReactNode

Content rendered above the canvas (pointer-events disabled by default)

Default:undefined
onRevealComplete() => void

Fires when the reveal animation reaches progress 1

Default:undefined
refPixelRevealRef

Imperative API: { trigger(), play(), reset() } for manual playback

Default:undefined