Team Account Navigation Configuration

Learn how to setup the team account navigation of your Next.js Supabase application

The team account navigation is set at apps/web/config/team-account-navigation.config.tsx. We use this configuration to define the menu of the team account. By default, it has four routes: dashboard, settings, members, and billing (if enabled).

We define it in one place so we can build different views at once (for example, the mobile menu).

Please update this file to add more routes to the sidebar.

const getRoutes = (account: string) => [ { label: 'common:dashboardTabLabel', path:'[account]', account), Icon: <LayoutDashboard className={iconClasses} />, end: true, }, { label: 'common:settingsTabLabel', collapsible: false, children: [ { label: 'common:settingsTabLabel', path: createPath(, account), Icon: <Settings className={iconClasses} />, }, { label: 'common:accountMembers', path: createPath(, account), Icon: <Users className={iconClasses} />, }, featureFlagsConfig.enableTeamAccountBilling ? { label: 'common:billingTabLabel', path: createPath(, account), Icon: <CreditCard className={iconClasses} />, } : undefined, ].filter(Boolean), }, ]; export function getTeamAccountSidebarConfig(account: string) { return SidebarConfigSchema.parse({ routes: getRoutes(account), style: process.env.NEXT_PUBLIC_TEAM_NAVIGATION_STYLE, }); } function createPath(path: string, account: string) { return path.replace('[account]', account); }

You can choose the style of the navigation by setting the NEXT_PUBLIC_TEAM_NAVIGATION_STYLE environment variable. The default style is sidebar.


Alternatively, you can set the style to header:


Subscribe to our Newsletter
Get the latest updates about React, Remix, Next.js, Firebase, Supabase and Tailwind CSS