Navigation
DashboardRouteDefinition
Defines a custom route for the dashboard with optional navigation menu integration.
interface DashboardRouteDefinition {
component: (route: AnyRoute) => React.ReactNode;
path: string;
navMenuItem?: Partial<NavMenuItem> & { sectionId: string };
loader?: RouteOptions['loader'];
}
component
(route: AnyRoute) => React.ReactNode
The React component that will be rendered for this route.
path
string
The URL path for this route, e.g. '/my-custom-page'.
navMenuItem
Partial<NavMenuItem> & { sectionId: string }
Optional navigation menu item configuration to add this route to the nav menu on the left side of the dashboard.
loader
RouteOptions['loader']
Optional loader function to fetch data before the route renders. The value is a Tanstack Router loader function
DashboardNavSectionDefinition
Defines a custom navigation section in the dashboard sidebar.
interface DashboardNavSectionDefinition {
id: string;
title: string;
icon?: LucideIcon;
order?: number;
}
id
string
A unique identifier for the navigation section.
title
string
The display title for the navigation section.
icon
LucideIcon
Optional icon to display next to the section title. The icons should
be imported from 'lucide-react'
.
Example
import { PlusIcon } from 'lucide-react';
order
number
Optional order number to control the position of this section in the sidebar.