Skip to main content

Routes

Defines a custom route for the dashboard with optional navigation menu integration.

Signature
interface DashboardRouteDefinition {    component: (route: AnyRoute) => React.ReactNode;    path: string;    navMenuItem?: Partial<NavMenuItem> & { sectionId: string };    loader?: RouteOptions<any>['loader'];    validateSearch?: RouteOptions<any>['validateSearch'];    authenticated?: boolean;}

component

property(route: AnyRoute) => React.ReactNode

The React component that will be rendered for this route.

path

propertystring

The URL path for this route, e.g. '/my-custom-page'.

propertyPartial<NavMenuItem> &#38; { sectionId: string }

Optional navigation menu item configuration to add this route to the nav menu on the left side of the dashboard.

The sectionId specifies which nav menu section (e.g. "catalog", "customers") this item should appear in. It can also point to custom nav menu sections that have been defined using the navSections extension property.

loader

propertyRouteOptions<any>['loader']

Optional loader function to fetch data before the route renders. The value is a Tanstack Router loader function

validateSearch

propertyRouteOptions<any>['validateSearch']

Optional search parameter validation function. The value is a Tanstack Router validateSearch function

authenticated

propertyboolean
Default:true

Define if the route should be under the authentication context, i.e have the authenticated route as a parent.

Was this chapter helpful?
Report Issue
Edited Feb 2, 2026·Edit this page