Navigation
DashboardNavSectionDefinition
Defines a custom navigation section in the dashboard sidebar.
Individual items can then be added to the section by defining routes in the
routes property of your Dashboard extension.
interface DashboardNavSectionDefinition {
id: string;
title: string;
icon?: LucideIcon;
order?: number;
}
id
stringA unique identifier for the navigation section.
title
stringThe display title for the navigation section.
icon
LucideIconOptional icon to display next to the section title. The icons should
be imported from 'lucide-react'.
Example
import { PlusIcon } from 'lucide-react';
order
numberOptional order number to control the position of this section in the sidebar.
NavMenuItem
Defines an items in the navigation menu.
interface NavMenuItem {
id: string;
title: string;
url: string;
icon?: LucideIcon;
order?: number;
placement?: NavMenuSectionPlacement;
requiresPermission?: string | string[];
}
id
stringA unique ID for this nav menu item
title
stringThe title that will appear in the nav menu
url
stringThe url of the route which this nav item links to.
icon
LucideIconAn optional icon component to represent the item,
which should be imported from lucide-react.
order
numberThe order is an number which allows you to control the relative position in relation to other items in the menu. A higher number appears further down the list.
placement
NavMenuSectionPlacementrequiresPermission
string | string[]This can be used to restrict the menu item to the given permission or permissions.