Next.js Intercepting Routes Modal example

An example showing Next.js 13's Intercepting Routes feature.

Navigating into the photo page client-side will open a modal instead of a full page, while still updating the URL. Navigating directly into the photo page URL or refreshing the page while the modal is open will bring up the photo page instead.

View Source
A speckled dog and laptop on a white studio floor
A checkered hot air balloon backlit by low sun over a grassy field
Woman in long dress looking out window at ocean
A red boat in a canal before colorful buildings in Nyhavn
A vintage Volvo brochure on a textured car seat inside an orange car
Bright vintage street lamp casting a shadow on a wall
Curved modern building facades with a grid pattern framing the sky
A man and a woman walking past ivy-covered storefronts on a concrete sidewalk
A woman in a black sweatshirt by water under yellow oak leaves