DocsPluginsShowcaseReleases
npmStar us on GitHub

Getting Started

IntroductionInstallationProject StructureLayouts and PagesLinking and Navigating

Routing

Folder-Based RoutingFile-Based RoutingDynamic RoutesParallel RoutesIntercepting RoutesCatch-All RoutesMDX & Markdown Pages

Special Files

Loading UIError BoundariesTemplateDefaultNot Found

Data Fetching

LoadersActionsAccessing Route Data

Metadata

Metadata & SEOOpen Graph & TwitterIcons & Favicons

API Routes

API Routes OverviewPlain Function HandlersHono IntegrationDynamic API Routes

Environment Variables

OverviewPrefixes & Client ExposureUsing in API Routes

Styling

CSS OverviewTailwind CSSCSS Modules

Platforms

WebWindowsmacOSLinuxAndroidiOS

Deployment

Deployment OverviewProduction ServerStatic ExportHosting Providers

A native React framework for building cross-platform applications from a single codebase.

Resources

  • Documentation
  • Plugins
  • Showcase
  • Releases

Community

  • GitHub Discussions
  • Reddit
  • Discord
  • LinkedIn

More

  • npm
  • GitHub
  • Issues
  • License

© 2026 Bini Cooperation.

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
FileWhen rendered
@analytics/page.tsxWhen the slot has a matching child
@analytics/default.tsxWhen the slot has no match for the URL
@team/default.tsxFallback for the team slot
  • 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.

Fallback 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
src/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

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

src/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 vs Page

Featurepage.tsxdefault.tsx
LocationAny folderInside @slot
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
PathURL
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

Template

Wrap each page individually inside the layout chain.

Not Found

Handle unmatched URLs with a custom 404 page.

Parallel Routes

Render multiple routes in the same layout with named slots.

Error Boundaries

Catch render errors and show a fallback UI.

Layouts and Pages

Create your first pages and wrap them in shared layouts.

Folder-Based Routing

Define routes with folders and page files inside them.

Was this helpful?
PreviousTemplate
NextNot Found (404)

On this page

  • Overview
  • Fallback for Parallel Routes
  • Creating a Default
  • Default vs Page
  • Complete Example
Edit this page on GitHub

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
FileWhen rendered
@analytics/page.tsxWhen the slot has a matching child
@analytics/default.tsxWhen the slot has no match for the URL
@team/default.tsxFallback for the team slot
  • 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.

Fallback 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
src/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

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

src/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 vs Page

Featurepage.tsxdefault.tsx
LocationAny folderInside @slot
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
PathURL
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

Template

Wrap each page individually inside the layout chain.

Not Found

Handle unmatched URLs with a custom 404 page.

Parallel Routes

Render multiple routes in the same layout with named slots.

Error Boundaries

Catch render errors and show a fallback UI.

Layouts and Pages

Create your first pages and wrap them in shared layouts.

Folder-Based Routing

Define routes with folders and page files inside them.

Was this helpful?
PreviousTemplate
NextNot Found (404)

On this page

  • Overview
  • Fallback for Parallel Routes
  • Creating a Default
  • Default vs Page
  • Complete Example
Edit this page on GitHub