Add to Production
Add the Vercel Toolbar to your production environment
As a team owner or member, you can enable the toolbar in your production environment for sites that your team(s) own, either through the dashboard or by adding the @vercel/toolbar package to your project.
Adding the toolbar using the browser extension
For team members that use supported browsers and want the most straightforward experience, we recommend using the Vercel Browser Extension to get access to the toolbar on your team's production sites.
For team members that use browsers for which a Vercel extension is not available, to allow toolbar access for everyone that accesses your site, or if you have more complex rules for when it shows in production, you'll need to add the @vercel/toolbar package to your project.
Adding the toolbar using the @vercel/toolbar package
For team members that do not use the browser extension or if you have more complex rules for when the toolbar shows in production, you can add the @vercel/toolbar package to your project:
-
Install the
@vercel/toolbar package and link your projectInstall the package in your project using the following command:
pnpm
yarn
npm
bun
pnpm i @vercel/toolbarThen link your local project to your Vercel project with the vercel link command using Vercel CLI.
vercel link [path-to-directory]
-
Add the toolbar to your projectBefore using the Vercel Toolbar in a production deployment Vercel recommends conditionally injecting the toolbar. Otherwise, all visitors will be prompted to log in when visiting your site.The following example demonstrates code that will show the Vercel Toolbar to a team member on a production deployment.
Next.js (/app)
TypeScript
'use client';import { VercelToolbar } from'@vercel/toolbar/next';
functionuseIsEmployee() {
// Replace this stub with your auth library hookreturnfalse;
}exportfunctionStaffToolbar() {
constisEmployee=useIsEmployee();
return isEmployee ?
}:null; Next.js (/app)
TypeScript
import { Suspense,type ReactNode } from'react';
import { StaffToolbar } from'../components/staff-toolbar';
exportdefaultfunctionRootLayout({ children }: { children:ReactNode }) {
return (
{children}