Parallel Routes with Named Slots and Default Segments
Render multiple independent route trees simultaneously using @slot conventions and default.tsx.
What Are Parallel Routes?
Parallel Routes is a Next.js App Router feature that lets you render multiple independent route segments simultaneously inside a single layout. Each segment lives in its own named slot and can navigate, load, and error independently.
- Think of a dashboard with a sidebar, a main panel, and a notification feed — all loaded in parallel, each with its own loading/error states.
- Parallel routes are defined using the
@foldernaming convention inside a route segment directory. - Each slot becomes a prop on the parent
layout.tsx.
This is fundamentally different from nested layouts: parallel slots share the same URL but render separate route trees side by side.
The @slot Convention
To create a parallel slot, prefix a folder with @ inside any route segment. Next.js treats these as named slots rather than URL segments.
app/dashboard/@analytics/page.tsx→ slot namedanalyticsapp/dashboard/@team/page.tsx→ slot namedteam- The
@foldername does not appear in the URL — visiting/dashboardrenders all matching slots.
A typical parallel-routes directory tree looks like this:
// Directory layout (not runnable — filesystem structure)
// app/
// dashboard/
// layout.tsx <- receives @analytics and @team as props
// page.tsx <- default slot content (children)
// @analytics/
// page.tsx
// loading.tsx
// @team/
// page.tsx
// error.tsxAll lessons in this course
- Parallel Routes with Named Slots and Default Segments
- Intercepting Routes for Shared Modal Experiences
- Conditional Slot Rendering for Dashboards and Tabs
- Building a Photo-Modal Flow with Soft Navigation