Components / component
Curtain Page Transition
Shrink the page to 80%, swap the content behind a vertical curtain, and expand the next page to full size.

Implementation
Shrink the page to 80%, swap the content behind a vertical curtain, and expand the next page to full size.
- Framework
- React 19.3.1 with TypeScript
- Motion
- Native CSS and browser APIs. No GSAP required.
- Available modes
- build
- Version
- 1.0.2 · published
Source code
export function PageHandoff({ viewKey, children, direction = 'forward', duration = defaultDuration, className }: PageHan
const [layers, setLayers] = useState<Layers>({ current: { key: viewKey, content: children }, transition: null });
const currentNode = useRef<HTMLDivElement>(null);Quality evidence
Export tested in 2 consumer projects with chromium, firefox, webkit. Evidence recorded on .
Changelog
v1.0.2 · Shrink the page to 80%, swap the content behind a vertical curtain, and expand the next page to full size.
Frequently asked questions
When does the page transition start?
It starts when the view key changes. Keep passing the current view until the incoming content and its critical media are ready.
Can I reverse the curtain for back navigation?
Yes. Set the direction prop to back for a descending curtain. Reduced-motion preferences switch views immediately.