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 typing on laptop at wooden table with breakfast.
A name tag with ai written on it
Dramatic sunset over a rocky coastline with wet sand.
A field of white daisies with yellow centers.
Delicate pink and white blossoms on a tree branch.
Strait of hormuz between iran and oman
Abstract blue and white swirling patterns
Two fathers carrying children on shoulders on a mountain path.
Glowing tent set up in a snowy landscape at night