<!-- PkgPulse AI-readable guide source -->
<!-- Canonical: https://www.pkgpulse.com/guides/storybook-10-to-11-migration -->
<!-- Raw Markdown: https://www.pkgpulse.com/guides/storybook-10-to-11-migration/raw.md -->
<!-- Source path: content/guides/storybook-10-to-11-migration.mdx -->

---
title: "Upgrading Storybook 10 to 11 with npm, React and Vite"
description: "Use this Storybook migration for React and Vite to check your runtime, update Docs configuration, and verify stories and browser interactions before release."
date: "2026-12-04"
updated: "2026-12-04"
author: "PkgPulse Team"
tags: ["migration", "component development"]
tileSubjects:
  - slug: storybook
    name: Storybook
  - slug: react
    name: React
  - slug: vite
    name: Vite
---

<!-- pipeline:claim c001 -->
<!-- pipeline:claim c002 -->
<!-- pipeline:claim c003 -->

Upgrade from Storybook 10.6.10 to 11.0.2 on React and Vite by moving the framework and addons together and keeping the existing CSF story format. First check that the same story opens, responds to a click, and still has its Docs page. In the test project, both versions built successfully, but the subtitle disappeared on Storybook 11 until the story moved it to `parameters.docs.subtitle`.

## Capture a baseline before changing dependencies

Start from a passing Storybook 10 build. If you are on an earlier major, finish the upgrade to Storybook 10 first. The Storybook 11 upgrader includes automigrations for the move from Storybook 10. Choose a story that uses your preview configuration, and record its URL, an expected change after user input, and a visible result from any addon your team relies on. Save the lockfile and last good static build so the new build can be checked against the same evidence. [Storybook migration guide](https://storybook.js.org/docs/11/releases/migration-guide)

Check the prerequisites in development, CI, and any service that builds your static Storybook. For React and Vite, Storybook documents minimum versions of Node.js 22.12, Vite 6.3, React 18, and TypeScript 5.9. The React framework declares TypeScript as a peer even for JavaScript projects because the default server-side docgen uses it. Use the [React Vite package manifest](https://registry.npmjs.org/@storybook%2freact-vite/11.0.2) to check the exact peer ranges and the [versioned migration notes](https://github.com/storybookjs/storybook/blob/v11.0.2/MIGRATION.md) for docgen caveats and the supported manager browsers.

Keep the existing major pinned if your CI image, required addon, or browser environment cannot meet the upgrade requirements. Resolve that blocker and prove the baseline still works before changing the Storybook packages. If you can keep your React and Vite versions, do so for the first pass. It makes a missing story or prop easier to trace to the Storybook change.

## Upgrade the framework and Docs addon together

<!-- pipeline:claim c004 -->

Run the official upgrader in a clean branch from your repository root. It finds Storybook projects, updates their packages and checks project health. If your repo has several Storybooks, review the output for each workspace. Check third-party addon peer ranges before starting. For the npm fixture, this command resolved the CLI, framework and Docs addon to the same release and ran the subtitle automigration. [Storybook upgrade workflow](https://storybook.js.org/docs/11/releases/upgrading)

The fixture starts with the React Vite framework, Docs addon and a compatible TypeScript dependency. It uses the following command and the existing build script.

```bash
npx --yes storybook@11.0.2 upgrade --yes --package-manager npm
npm run build-storybook
```

The build script runs `storybook build`. Review the manifest, lockfile and story diff the upgrader leaves behind, including any agent setup files it adds. A direct install over the fixture's old lockfile hit npm's `ERESOLVE`. The official upgrader completed and the resulting lockfile passed a clean `npm ci`. This `.storybook/main.ts` worked on both package sets. The story glob points at the same files on both sides, and `@storybook/addon-docs` stays registered.

```ts
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
  framework: '@storybook/react-vite',
  stories: ['../src/**/*.stories.tsx'],
  addons: ['@storybook/addon-docs'],
};

export default config;
```

## Verify the story in Canvas and Docs

<!-- pipeline:claim c005 -->
<!-- pipeline:claim c006 -->

The test component in `src/Toggle.tsx` exposes its state through `aria-pressed`. The browser check reads that attribute before and after a click on the button named “Toggle alerts”.

```tsx
import { useState } from 'react';

export function Toggle({ label }: { label: string }) {
  const [pressed, setPressed] = useState(false);

  return (
    <button aria-pressed={pressed} onClick={() => setPressed(!pressed)}>
      {label}
    </button>
  );
}
```

In `src/Toggle.stories.tsx`, the original component metadata used `parameters: { componentSubtitle: 'Toggle button states' }`. The `component-subtitle` automigration changed that line to the nested `docs.subtitle` form below. The story's title, export, args and `autodocs` tag stayed in place, so the Canvas and Docs URLs could be compared directly. If your parameters are assembled with spreads, check the migration summary and move any subtitle the tool leaves behind. [Subtitle migration notes](https://github.com/storybookjs/storybook/blob/v11.0.2/MIGRATION.md#parameterscomponentsubtitle-removed)

```tsx
import type { Meta, StoryObj } from '@storybook/react-vite';
import { Toggle } from './Toggle';

const meta = {
  title: 'Migration/Toggle',
  component: Toggle,
  tags: ['autodocs'],
  parameters: { docs: { subtitle: 'Toggle button states' } },
} satisfies Meta<typeof Toggle>;

export default meta;

export const Default: StoryObj<typeof meta> = {
  args: { label: 'Toggle alerts' },
};
```

The fixture ran on Linux with Node.js 24.22.2, npm 11.19.1, React and React DOM 19.2.0, Vite 7.3.8 and TypeScript 5.9.3. The CLI, framework and Docs addon all used the Storybook version listed for each build.

| Build | Static build and Canvas | Docs |
| --- | --- | --- |
| Storybook 10.6.10 baseline | Build passed. Clicking the toggle changed `aria-pressed` from `false` to `true`. | Subtitle and `label` prop row appeared. |
| Storybook 11.0.2 with the old subtitle key | Build passed. | The `label` row appeared and the subtitle was missing. |
| Storybook 11.0.2 after the subtitle migration | Build passed. The same click changed `aria-pressed` from `false` to `true`. | Subtitle and `label` prop row appeared. |

Load `?path=/story/migration-toggle--default` from the built site and check the button state. Then load `?path=/docs/migration-toggle--docs` and check the subtitle and the prop row separately. A green build and a working button can leave gaps in Docs. If your props come from a shared type or your docs depend on custom prop filtering, use a component that exercises that setup. The fixture's single typed prop covers the simplest extraction path.

## Carry the browser check into CI

<!-- pipeline:claim c007 -->

The fixture covered the built Canvas and Docs views in Chrome 158.0.8127.107. If you use `@storybook/test-runner`, give the runner its own checkpoint before retiring the old CI job. Storybook documents that this runner is incompatible with Storybook 11 and provides a migration to `@storybook/addon-vitest` for Vite projects. The addon requires Vitest 4.0 or later. Run your own existing `play` tests in browser mode and check that CI still fails on a broken assertion. The click check above used the built story directly. [Storybook test-runner migration](https://storybook.js.org/docs/11/writing-tests/integrations/vitest-addon/migration-guide) · [Vitest addon version requirement](https://github.com/storybookjs/storybook/blob/v11.0.2/MIGRATION.md#vitest-addon-requires-vitest-40-or-higher)

Install from the committed lockfile on the pinned CI runtime, then build from a clean checkout. Serve the artifact under the path your team uses and open a direct story link from a fresh browser session. Check that the manager, preview frame and any fonts or other static assets load there. Repeat the Docs and interaction checks on a story that uses your real decorators and providers. For a visual review service or a community addon, run the workflow your team actually depends on and compare it with the baseline.

Switch the published artifact after those checks pass. If the release fails, restore the last passing package manifest, lockfile, Storybook configuration and story changes together, or republish the saved static build while you investigate. Keeping the story format conversion for a separate change makes that rollback easier. Storybook documents the move from CSF 3 to CSF 4 as optional, and the test project kept CSF 3. [Optional CSF migration](https://storybook.js.org/docs/11/releases/migration-guide#csf-3-to-csf-4)

## Related guides

- If you also need to move the build tool, use the [Vite migration guide for React and Vue](/guides/vite-7-to-8-migration) for a separate set of build and runtime checks.
- If the review depends on image comparisons, see the [visual regression testing guide](/guides/chromatic-vs-percy-vs-applitools-visual-regression-2026) for the role the static Storybook plays in a snapshot workflow.
- Check the [Storybook package on PkgPulse](/packages/storybook) before picking an update for the rest of your workspace.

## Source notes

<!-- pipeline:source s001 -->
<!-- pipeline:source s002 -->
<!-- pipeline:source s003 -->
<!-- pipeline:source s004 -->
<!-- pipeline:source s005 -->
<!-- pipeline:source s006 -->
<!-- pipeline:source s007 -->
<!-- pipeline:source s008 -->
<!-- pipeline:source s009 -->

- [Baseline release](https://github.com/storybookjs/storybook/releases/tag/v10.6.10), [target release](https://github.com/storybookjs/storybook/releases/tag/v11.0.2) and [npm release tags](https://registry.npmjs.org/-/package/storybook/dist-tags)
- [React Vite peer dependencies](https://registry.npmjs.org/@storybook%2freact-vite/11.0.2) and [Docs addon peer dependencies](https://registry.npmjs.org/@storybook%2faddon-docs/11.0.2)
- [Official migration guide](https://storybook.js.org/docs/11/releases/migration-guide), [detailed migration notes](https://github.com/storybookjs/storybook/blob/v11.0.2/MIGRATION.md) and [upgrade workflow](https://storybook.js.org/docs/11/releases/upgrading)
