Pixel Sweep
imageProA photo that dissolves into view square by square behind a ragged sweeping front, from a solid colour or a mosaic of itself.
Introductory price until 31 December 2026. €79 after that.
Preview
Live demo. The theme switches the demo itself.
Code
The code is locked
Pixel Sweep is part of Manniche UI Pro. A key unlocks the source of all 66 effects.
Buy · €49€49 · Introductory price until 31 December 2026. €79 after that.
- One-off payment
- One developer
- Sign in and create your key straight away
- No VAT (§ 19 UStG)
Have a key? Get the code with the CLI or MCP.
The key lives in MANNICHE_PRO_KEY, never in your code or a URL. How to set it up
npx shadcn@latest add @manniche-pro/pixel-sweepclaude mcp add --transport http manniche-ui https://mikkelmanniche.dk/api/mcp --header "Authorization: Bearer $MANNICHE_PRO_KEY"Props
PixelSweepProps
| Prop | Type | Default | What it does |
|---|---|---|---|
src required | string | – | The photo. A new src is loaded in the background; the old photo stays until the new one is ready, then the new one sweeps in. |
alt required | string | – | Describes the photo for screen readers. |
direction | PixelSweepDirection | 'right' | The way the reveal travels. right starts at the left edge and sweeps to the right. |
cellSize | number | 22 | Size of one square in CSS pixels. |
cover | string | '#0e0e10' | What the photo hides under: a hex colour, or mosaic for the photo itself in blocks of one colour (needs CORS on cross-origin photos, otherwise it falls back to a dark grey). |
edgeNoise | number | 0.55 | 0 is a straight front; 1 is a ragged, scattered one with tongues running ahead. |
duration | number | 1500 | Length of the sweep in milliseconds. |
easing | PixelSweepEasing | 'in-out' | Pace of the sweep. |
delay | number | 0 | Wait in milliseconds before the sweep starts. |
play | boolean | – | Leave it out to reveal once, when a third of the box has scrolled into view. true reveals, false covers the photo again, each with the same sweep. |
seed | number | 7 | Changes the scatter pattern, so several on a page do not dissolve alike. |
onRevealComplete | () => void | – | Called once the photo is fully revealed. |
fit | 'cover' | 'contain' | 'cover' | cover crops the photo to fill the box, contain shows all of it. |
focusX | number | 0.5 | Horizontal focus point from 0 (left) to 1 (right), used when cover crops the photo. |
focusY | number | 0.5 | Vertical focus point from 0 (top) to 1 (bottom), used when cover crops the photo. |
children | ReactNode | – | Content shown on top of the photo. |
className | string | – | – |
A11y
Screen reader
The alt text sits on a real image behind the aria-hidden canvas, so the picture is read once, whether or not the cover has finished.
Reduced motion
Under reduced motion the reveal jumps straight to its end state. Otherwise the reveal starts when about 30% of the effect is in view, or when play turns true. play false keeps the cover on purpose.