@folder) to render modals alongside the main content.1app/2├── @modal/3│ ├── default.tsx # Returns null when no modal4│ └── (.)photo/5│ └── [id]/6│ └── page.tsx # Intercepted modal version7├── photo/8│ └── [id]/9│ └── page.tsx # Full page version10├── layout.tsx # Renders {children} and {modal}11└── page.tsx # Main gallery page
| Prefix | Description |
|---|---|
(.) | Match segments on the same level |
(..) | Match segments one level above |
(..)(..) | Match segments two levels above |
(...) | Match segments from the root |
@modal/default.tsx - Returns null when no modal is active@modal/(.)photo/[id]/page.tsx - The intercepted modal versionphoto/[id]/page.tsx - The full page versionlayout.tsx - Renders both children and modal slotsClient navigation shows the modal; direct access renders the full page.
| Topic | Guidance |
|---|---|
| UX | Use for modals or contextual overlays |
| Routing | Intercepted routes preserve URLs |
| Fallback | Full page renders on refresh or direct access |







