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
Couple posing for photographer with mountain backdrop
Woman with hands covering face in motion blur
Traditional japanese street scene with river and trees.
Mercedes-benz emblem on a car hood at night
Symmetrical concrete building with geometric design
Seat pocket with baltic magazine on airplane
Four colorful koi fish swim in dark water.
Card for "the potted planter" seasonal workshops.
Dark alleyway with graffiti and distant figures.