default.tsx is the fallback for parallel route slots - special file, no URL.
Place default.tsx inside an @slot folder. When the current URL has no matching child route for that slot, the default is rendered instead. It does not create a URL.
| File | When rendered |
|---|---|
| @analytics/page.tsx | When the slot has a matching child |
| @analytics/default.tsx | When the slot has no match for the URL |
| @team/default.tsx | Fallback for the team slot |
@slot.@slot folders.not-found.tsx for missing routes.Parallel slots like @analytics and @team render beside the main page inside the parent layout. When you navigate to a path the slot does not define, that slot shows its default.tsx.
@analytics) do not appear in the URL. Sub-routes under a slot (e.g. views/page) do contribute path segments.Create default.tsx inside any @slot folder. Export a default component - no special props required.
| Feature | page.tsx | default.tsx |
|---|---|---|
| Location | Any folder | Inside @slot |
| When rendered | Route matches | Slot has no matching child |
| Use case | Route UI | Soft slot fallback |
/dashboard/settings. If @analytics has no settings child, @analytics/default renders while @team/settings/page (if present) still shows.| Path | URL |
|---|---|
| dashboard/page.tsx | /dashboard |
| dashboard/@analytics/page.tsx | /dashboard |
| dashboard/@analytics/default.tsx | - |
| dashboard/@analytics/views/page.tsx | /dashboard/views |
| dashboard/@team/settings/page.tsx | /dashboard/settings |
Wrap each page individually inside the layout chain.
Handle unmatched URLs with a custom 404 page.
Render multiple routes in the same layout with named slots.
Catch render errors and show a fallback UI.
Create your first pages and wrap them in shared layouts.
Define routes with folders and page files inside them.
default.tsx is the fallback for parallel route slots - special file, no URL.
Place default.tsx inside an @slot folder. When the current URL has no matching child route for that slot, the default is rendered instead. It does not create a URL.
| File | When rendered |
|---|---|
| @analytics/page.tsx | When the slot has a matching child |
| @analytics/default.tsx | When the slot has no match for the URL |
| @team/default.tsx | Fallback for the team slot |
@slot.@slot folders.not-found.tsx for missing routes.Parallel slots like @analytics and @team render beside the main page inside the parent layout. When you navigate to a path the slot does not define, that slot shows its default.tsx.
@analytics) do not appear in the URL. Sub-routes under a slot (e.g. views/page) do contribute path segments.Create default.tsx inside any @slot folder. Export a default component - no special props required.
| Feature | page.tsx | default.tsx |
|---|---|---|
| Location | Any folder | Inside @slot |
| When rendered | Route matches | Slot has no matching child |
| Use case | Route UI | Soft slot fallback |
/dashboard/settings. If @analytics has no settings child, @analytics/default renders while @team/settings/page (if present) still shows.| Path | URL |
|---|---|
| dashboard/page.tsx | /dashboard |
| dashboard/@analytics/page.tsx | /dashboard |
| dashboard/@analytics/default.tsx | - |
| dashboard/@analytics/views/page.tsx | /dashboard/views |
| dashboard/@team/settings/page.tsx | /dashboard/settings |
Wrap each page individually inside the layout chain.
Handle unmatched URLs with a custom 404 page.
Render multiple routes in the same layout with named slots.
Catch render errors and show a fallback UI.
Create your first pages and wrap them in shared layouts.
Define routes with folders and page files inside them.