Default

Experimental

default.tsx is the fallback for parallel route slots - special file, no URL.

Overview

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.

dashboard
layout.tsx
page.tsx
@analytics
page.tsx
default.tsx
@team
page.tsx
default.tsx
/dashboard
FileCreates URL?When rendered
@analytics/page.tsxVia parent routeWhen the slot has a matching child
@analytics/default.tsxNo - special fileWhen the slot has no match for the URL
@team/default.tsxNo - special fileFallback for the team slot

What is default.tsx?

default.tsx is the soft fallback for a parallel route slot. If navigation leaves a slot without a matching page, the slot shows its default instead of going blank or 404ing the whole page.

  • Slot fallback: used when no child route matches inside @slot
  • No URL: special file - does not create a route
  • Parallel only: meaningful inside @slot folders
  • Not a 404: use not-found.tsx for missing routes

default.tsx for Parallel 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.

dashboard
layout.tsx
page.tsx
@analytics
page.tsx
default.tsx
views
page.tsx
@team
page.tsx
default.tsx
settings
page.tsx
/dashboard
/dashboard/views
/dashboard/settings
app/dashboard/@analytics/default.tsx
export default function DefaultAnalytics() {
  return (
    <div className="p-4 text-sm text-neutral-500">
      Select an analytics view
    </div>
  )
}
Slot folder names (@analytics) do not appear in the URL. Sub-routes under a slot (e.g. views/page) do contribute path segments.

Creating a default.tsx

Create default.tsx inside any @slot folder. Export a default component - no special props required.

app/dashboard/@team/default.tsx
export default function DefaultTeam() {
  return (
    <div className="rounded-lg border border-neutral-200 p-6 dark:border-neutral-800">
      <h3 className="font-medium">Team</h3>
      <p className="mt-1 text-sm text-neutral-500">
        Select a team view
      </p>
    </div>
  )
}

default.tsx vs page.tsx

Featurepage.tsxdefault.tsx
LocationAny folderInside @slot
Creates URL?YesNo - special file
When renderedRoute matchesSlot has no matching child
Use caseRoute UISoft slot fallback
Example: navigate to /dashboard/settings. If @analytics has no settings child, @analytics/default renders while @team/settings/page (if present) still shows.

Complete Example

app
layout.tsx
page.tsx
dashboard
layout.tsx
page.tsx
@analytics
page.tsx
default.tsx
views
page.tsx
@team
page.tsx
default.tsx
settings
page.tsx
/
/dashboard
/dashboard/views
/dashboard/settings
PathURLCreates URL?
dashboard/page.tsx/dashboardYes
dashboard/@analytics/page.tsx/dashboardVia parent (no @ segment)
dashboard/@analytics/default.tsx-No - special file
dashboard/@analytics/views/page.tsx/dashboard/viewsYes
dashboard/@team/settings/page.tsx/dashboard/settingsYes
This docs page is named defaults.tsx so the site does not treat it as the special default.tsx convention. In apps, use default.tsx inside @slot folders.
Was this helpful?