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
Woman shopping at a plant nursery with a basket
a yellow building with a red door and a window
Shadow of a person against a wall by a wall
A vase of yellow daffodils and pink carnations
Close-up of water droplets on a blue textured surface.
Sun setting over a calm ocean horizon
blue and white abstract painting
Three friends talking outdoors on a sunny day.
Four keyboard keys with words and symbols.