
Block Transition
Transitions
A pixel-dissolve page transition that breaks route changes into a crisp digital grid reveal.
Pixel Transition turns the cut between routes into a designed moment: pixels dissolve the old page into the new one.
Use it on brand sites, campaign pages, portfolios, and editorial journeys where route changes benefit from continuity. Avoid it in apps, docs, checkout, and search paths where navigation speed is the feature.
The risk in production is delay. Mount the transition where route state actually changes, keep the duration short, restore focus after navigation, and give reduced-motion users an instant or nearly instant path.
(Next.js App Router only. Requires next-transition-router for route-transition lifecycle hooks and renders its TransitionRouter itself, so no separate provider is needed. This effect will not function in plain React or in the Next.js Pages Router.)
import PixelTransition from "@/components/effects/pixel-transition"; export default function RootLayout({ children }) { return ( <html lang="en"> <body> <PixelTransition>{children}</PixelTransition> </body> </html> );}An indie game studio can use Pixel Transition between its homepage, game pages, and press kit. On each route change, a grid of pixels fills the screen in a diagonal sweep and then clears to show the next page, echoing the low-resolution look of the studio's games.
The outcome is tone. The site feels like part of the game world from the first click, and a short duration keeps the transition from holding back visitors on their way to the trailer or press kit.
Not for apps, docs, checkout, search, or frequently navigated product flows where delay harms completion.
Keep duration short, avoid artificial route delays, and do not block interactivity after the destination route is ready.
Move focus to the destination main region after navigation. On mobile and reduced motion, use instant transitions or short fades.
| Prop | Type | Default | Description |
|---|---|---|---|
cols | number | 30 | Pixel grid columns. |
rows | number | 40 | Pixel grid rows. |
pixelColor | string | #111111 | Color used to draw each transition pixel. |
duration | number | 1 | Duration multiplier for the leave and enter pixel sweeps. |
enableContentShift | boolean | false | Adds content scale/blur during the transition. |
Use it when a technical, game-like, or retro-digital brand needs pixels dissolving one page into the next without delaying navigation.
Mount it in your root layout around {children}, as in the usage code. Pixel Transition renders TransitionRouter from next-transition-router itself, so it stays mounted across navigations and no separate provider or template is needed.
By default the pixel grid fills over 1.0s on leave and clears over 0.8s on enter, about 1.8s in total. The duration prop is a multiplier (default 1, clamped 0.25 to 3), so lower it for a faster cut.
Move focus to the destination main region or heading after navigation completes.
With reduced motion enabled, the component skips the pixel grid and fades the page out and back in over 0.2s each.
Yes. A custom version should define motion rules, visual treatment, performance budget, fallback behavior, source handoff, and implementation notes for the specific page or launch context.
Need a custom effect? Tell us what to create.