Pixel Reveal
An image that reveals itself through a sweep of pixels
Customize
Tweak the props liveImage & Geometry
#ffffffAnimation
Trigger
Props
| Name | Type | Default | Description |
|---|---|---|---|
imageSrc | string | "" | Image URL to reveal (required) |
width | string | number | "100%" | Container width |
height | string | number | "100%" | Container height |
gridSize | number | 20 | Approximate pixel size of each dissolving cell — lower means a denser grid (4–80) |
transitionColor | string | "#242424" | Hex color of the dissolving pixel squares |
edgeHeight | number | 0.2 | Thickness of the noisy leading edge as a fraction of the axis (0.05–0.6) |
duration | number | 1.6 | Total reveal duration in seconds (0.2–6) |
easing | "linear" | "easeIn" | "easeOut" | "easeInOut" | "linear" | Easing curve applied to the progress ramp |
direction | "up" | "down" | "left" | "right" | "up" | Axis along which the reveal sweeps |
autoTrigger | boolean | true | Auto-fire the reveal when the container intersects the viewport |
triggerOnce | boolean | false | Only auto-trigger on the first viewport entry; otherwise replay each time it re-enters |
triggerThreshold | number | 0 | Intersection ratio that fires the auto-trigger (0–1) |
paused | boolean | false | Freeze the animation in place |
borderRadius | string | number | "0px" | Border radius applied to the container |
className | string | "" | Additional CSS classes for the container |
children | ReactNode | undefined | Content rendered above the canvas (pointer-events disabled by default) |
onRevealComplete | () => void | undefined | Fires when the reveal animation reaches progress 1 |
ref | PixelRevealRef | undefined | Imperative API: { trigger(), play(), reset() } for manual playback |
imageSrcstringImage URL to reveal (required)
""widthstring | numberContainer width
"100%"heightstring | numberContainer height
"100%"gridSizenumberApproximate pixel size of each dissolving cell — lower means a denser grid (4–80)
20transitionColorstringHex color of the dissolving pixel squares
"#242424"edgeHeightnumberThickness of the noisy leading edge as a fraction of the axis (0.05–0.6)
0.2durationnumberTotal reveal duration in seconds (0.2–6)
1.6easing"linear" | "easeIn" | "easeOut" | "easeInOut"Easing curve applied to the progress ramp
"linear"direction"up" | "down" | "left" | "right"Axis along which the reveal sweeps
"up"autoTriggerbooleanAuto-fire the reveal when the container intersects the viewport
truetriggerOncebooleanOnly auto-trigger on the first viewport entry; otherwise replay each time it re-enters
falsetriggerThresholdnumberIntersection ratio that fires the auto-trigger (0–1)
0pausedbooleanFreeze the animation in place
falseborderRadiusstring | numberBorder radius applied to the container
"0px"classNamestringAdditional CSS classes for the container
""childrenReactNodeContent rendered above the canvas (pointer-events disabled by default)
undefinedonRevealComplete() => voidFires when the reveal animation reaches progress 1
undefinedrefPixelRevealRefImperative API: { trigger(), play(), reset() } for manual playback
undefined