Skip to Content

Vercel Toolbar

Add the Vercel Toolbar to your local environment

Add to Environments

To enable the toolbar in your local environment, add it to your project using the @vercel/toolbar package, or with an injection script.

Add to Localhost

Copy page

  1. Install the @vercel/toolbar package and link your projectInstall the package 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]
  2. Add the toolbar to your projectTo use the Vercel Toolbar locally in a Next.js project, define withVercelToolbar in your next.config.js file and export it, as shown below:

    Next.js (/app)

    TypeScript

    importtype { NextConfig } from'next';

    import createWithVercelToolbar from'@vercel/toolbar/plugins/next';

    constnextConfig:NextConfig= {

    // Config options here };

    constwithVercelToolbar=createWithVercelToolbar();

    // Instead of export default nextConfig, do this:

    exportdefaultwithVercelToolbar(nextConfig);

    Then add the following code to your layout.tsx or layout.jsx file:

    Next.js (/app)

    TypeScript

    import { VercelToolbar } from'@vercel/toolbar/next';

    exportdefaultfunctionRootLayout({

    children, }: {

    children:React.ReactNode;

    }) {

    constshouldInjectToolbar=process.env.NODE_ENV==='development';

    return (

    {children} {shouldInjectToolbar && } ); }

Last updated August 11, 2026

Cross-link map: Add the Vercel Toolbar to your local environment (/docs/vercel-toolbar/in-production-and-localhost/add-to-localhost)From the Vercel docs graph (built 2026-09-21T05:26:59.511Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as JSON: https://vercel.com/docs/graph.jsonSemantically closest pagesAdd the Vercel Toolbar to your production environment — Learn how to add the Vercel Toolbar to your production environment and how your team members can use tooling to access tEasier toolbar setup for SvelteKit and other Vite-based frameworksManaging the visibility of the Vercel Toolbar — Learn how to enable or disable the Vercel Toolbar for your team, project, and session.Add the Vercel Toolbar to local and production environments — Learn how to use the Vercel Toolbar in production and local environments.Managing with the Vercel Toolbar — Learn how to use the Vercel Toolbar to make it easier to manage microfrontends.This page links to (4)Account Management — Learn how to manage your Vercel account and team members.Vercel CLI Overview — Learn how to use the Vercel command-line interface \(CLI\) to manage and configure your Vercel Projects from the commandvercel link — Learn how to link a local directory to a Vercel Project using the vercel link CLI command.Projects overview — A project is where you deploy and operate frontend apps, APIs, backends, containers, and agent workloads on Vercel.Pages that link here (3)By site: vercel-docs (3)Next.js on Vercel — Vercel is the native Next.js platform, designed to enhance the Next.js experience.SvelteKit on Vercel — Deploy SvelteKit applications to Vercel and configure the adapter, rendering, streaming, ISR, analytics, and Routing MidAdd the Vercel Toolbar to local and production environments — Learn how to use the Vercel Toolbar in production and local environments.