Dev ToolbarGetting Started

Getting Started

Install and configure the Visulima Dev Toolbar in your Vite project in under two minutes.

Last updated:

Install

bash npm install -D @visulima/dev-toolbar
bash pnpm add -D @visulima/dev-toolbar
bash yarn add -D @visulima/dev-toolbar
bash bun add -d @visulima/dev-toolbar

The package is a development-only tool. It is automatically excluded from production builds — the Vite plugin no-ops when command !== 'serve'.

Add the Vite Plugin

Open your vite.config.ts and add the devToolbar plugin:

vite.config.ts
import { defineConfig } from "vite";
import { devToolbar } from "@visulima/dev-toolbar/vite";

export default defineConfig({
    plugins: [devToolbar()],
});

That's it. Start your dev server and press Alt+Shift+D to open the toolbar.

Open the Toolbar

A small pill appears at the bottom-center of your page. Click any app icon to open its panel, or use the keyboard shortcut:

ActionShortcut
Toggle toolbar open/closeAlt+Shift+D
Close active app / panelEscape

Minimal Configuration

By default only the Vite Config and Settings apps are shown. Enable whichever optional apps you need:

vite.config.ts
import { defineConfig } from "vite";
import { devToolbar } from "@visulima/dev-toolbar/vite";

export default defineConfig({
    plugins: [
        devToolbar({
            // Toolbar placement
            placement: "bottom-right",

            // Opt-in to the apps you want
            apps: {
                inspector: true,
                performance: true,
                seo: true,
            },

            // Change the default keyboard shortcuts
            keybindings: {
                toggle: "Alt+Shift+D",
                close: "Escape",
            },
        }),
    ],
});

Using with SSR Frameworks

SSR frameworks such as TanStack Start, Nuxt, and SvelteKit render the full HTML document server-side. Vite's transformIndexHtml hook — which the toolbar normally uses to inject its <script> — is never called on those server-rendered responses.

TanStack Start (auto-detected)

The plugin automatically detects TanStack Start and injects the toolbar via the module graph (targeting router.tsx) — no extra configuration needed:

vite.config.ts
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import { devToolbar } from "@visulima/dev-toolbar/vite";
import viteReact from "@vitejs/plugin-react";
import { defineConfig } from "vite";

export default defineConfig({
    plugins: [
        tanstackStart(),
        viteReact(),
        devToolbar(),
    ],
});

Because TanStack Start renders on the server, any window.__DEV_TOOLBAR_HOOK__ calls must be placed inside a useEffect to ensure they only run in the browser:

React.useEffect(() => {
    if (typeof window !== "undefined" && window.__DEV_TOOLBAR_HOOK__) {
        window.__DEV_TOOLBAR_HOOK__.addTimelineEvent("custom", { /* ... */ });
    }
}, []);

Other SSR / Non-HTML Setups

For any project without a static index.html entry point that is not auto-detected, use the appendTo option to inject the toolbar via the JavaScript module graph instead of the HTML pipeline. The transform hook that powers appendTo automatically skips SSR builds (transformOptions.ssr === true), so the import is only added to the client bundle.

Point appendTo at a module that is guaranteed to run client-side only:

vite.config.ts
devToolbar({
    appendTo: "src/main.ts",
});

Framework Examples

vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { devToolbar } from "@visulima/dev-toolbar/vite";

export default defineConfig({
    plugins: [
        react(),
        devToolbar(),
    ],
});
vite.config.ts
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { devToolbar } from "@visulima/dev-toolbar/vite";

export default defineConfig({
    plugins: [
        vue(),
        devToolbar(),
    ],
});
vite.config.ts
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { devToolbar } from "@visulima/dev-toolbar/vite";

export default defineConfig({
    plugins: [
        svelte(),
        devToolbar(),
    ],
});
vite.config.ts
import { defineConfig } from "vite";
import { devToolbar } from "@visulima/dev-toolbar/vite";

export default defineConfig({
    plugins: [
        devToolbar(),
    ],
});
vite.config.ts
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import { devToolbar } from "@visulima/dev-toolbar/vite";
import viteReact from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import tsConfigPaths from "vite-tsconfig-paths";

export default defineConfig({
    plugins: [
        tsConfigPaths({ projects: ["./tsconfig.json"] }),
        tanstackStart(),
        viteReact(),
        // TanStack Start is auto-detected — no appendTo needed.
        devToolbar(),
    ],
});

Next Steps

Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues