
Block Transition
Transitions
Guide route changes with drawn SVG linework, giving illustrated and editorial sites a crafted transition between pages.
SVG Brush Transition turns the cut between routes into a designed moment. A line-drawn mask guides the visitor from one page to the next.
Use SVG Brush Transition on brand sites, portfolios, campaign pages, and editorial journeys where navigation should feel connected. The page job is continuity: the transition should make the change of route feel intentional without making the destination wait for applause.
The production risk is delay. Page transitions become a problem when they pretend to be loading states, trap focus, or run full-screen motion for people who asked for less motion. Mount the transition where route state actually changes, keep it short, restore focus after navigation, and provide an instant fallback.
import SVGBrushTransition from "@/components/effects/svg-brush-transition";import type { ReactNode } from "react"; interface LayoutProps { children: ReactNode;} export default function Layout({ children }: LayoutProps) { return ( <SVGBrushTransition config={{ enableBlur: false, strokeColor: "#82A0FF", duration: 1.5, }} > {children} </SVGBrushTransition> );}An illustrated portfolio can use SVG Brush Transition between project pages so each route change feels like part of the visual language. The linework moves briefly and the next page appears. The outcome is continuity: the brand gets a crafted navigation moment without slowing the route.
Not for apps, docs, checkout, search, dashboards, or product flows where navigation speed is the feature.
Not for routes where visitors navigate repeatedly and would resent the same flourish every few seconds.
Keep duration short, avoid artificial route delays, animate SVG properties with restraint, and do not block interactivity after the destination route is ready. A transition that overstays its welcome is just a branded door in the user’s face.
Move focus to the destination main region or heading after navigation. Respect reduced-motion preferences with instant navigation or a short fade. On mobile, reduce mask complexity and avoid full-screen linework that delays orientation.
| Prop | Type | Default | Description |
|---|---|---|---|
strokeColor | string | #82A0FF | SVG brush stroke color. |
duration | number | 1.5 | Duration of the SVG brush draw and reveal animations. |
Use it when an illustrated, editorial, or campaign site needs a line-drawn route change that feels crafted without delaying navigation.
Mount it in your root layout around {children}, as in the usage code. SVG Brush 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 brush draws over 1.5s on leave and erases over 1.5s on enter, with a 0.5s overlay fade, about 3s in total. The duration prop (default 1.5, clamped 0.25 to 4) sets each draw, so lower it for a quicker cut.
Move focus to the destination main region or heading after navigation completes. The transition should not leave keyboard users stranded on an element from the previous route.
With reduced motion enabled, the component skips the brush stroke and fades the page out and back in over 0.2s each.
Yes. A custom version should define line style, mask behavior, transition timing, focus restoration, mobile fallback, source handoff, and implementation notes for the specific route system.
Need a custom effect? Tell us what to create.