Pixel Reveal
Image or generated art dissolves in through a shrinking pixel grid when scrolled into view — random, diagonal or centre-out — with an optional replay.
Try it: Press the replay button to run it again.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/pixel-reveal.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/pixel-reveal. You can also copy the source into components/ui/pixel-reveal.tsx (view on GitHub).
Usage
import { PixelReveal } from '@/components/ui/pixel-reveal'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
src / alt | string | — | Image; omit for generated art. |
cols / rows | number | 12 / 8 | Grid size. |
pattern | 'random' | 'diagonal' | 'center' | 'random' | Dissolve order. |
duration | number | 900 | Cascade length (ms). |
showReplay | boolean | false | Replay button. |
children | ReactNode | — | Overlay content (e.g. a caption). |
Dependencies
lucide-react
Related Cards components
- Hologram Flip Card
Flip to holographic rear with iridescent sheen.
- Border Beam
A comet of light travels a crisp masked hairline border, with an optional soft bloom. Static under reduced motion.
- Liquid Morph Card
Border/blob morphs toward pointer.
- Swipe Cards
Stacked deck: drag, flick, tap or arrow-key cards away with keep/pass stamps; the deck springs forward and every swipe is announced. Fades instead of flying under reduced motion.
- Gravity Expand Card
Click expands with spring; collapse on second click/outside.
- Glass Card
Liquid-glass surface with specular rim, inner hairline and layered depth; regular (frosted) or clear variants, and a solid fallback for prefers-reduced-transparency.