Introducing a new way to review your PRs.

Read the announcement

storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation

View on GitHub

20 documents · Updated Nov 20, 2026

overview

Knowledge Base updated: 2026-11-19

Storybook knowledge base

Orientation

Storybook is a TypeScript monorepo for developing, testing, documenting, and distributing UI components. Its product runtime comprises a Node-based server and CLI, a browser manager application, and a browser preview that renders user stories.

code/core contains the shared runtime contracts, configuration and preset resolution, server orchestration, manager, and preview APIs. Framework, renderer, builder, and addon packages adapt that core to application technologies and product features.

Monorepo tooling lives in code/lib, scripts, workspace configuration, and CI-oriented utilities. External compatibility validation is maintained separately in ecosystem-qa, while test applications and sandboxes exercise supported integrations.

Critical runtime state crosses the manager/preview boundary through shared channel events and preview annotations. Build and server state is assembled from user configuration, presets, framework and builder selection, and generated manifests.

flowchart TD
  User[Storybook user project] --> CLI[CLI and core-server]
  CLI --> Presets[Preset and config resolution]
  Presets --> Frameworks[Framework packages]
  Frameworks --> Builders[Vite / Webpack builders]
  Builders --> Server[Development server / static build]
  Server --> Manager[Manager UI]
  Server --> Preview[Preview runtime]
  Manager <--> Channel[Shared channel APIs]
  Preview <--> Channel
  Preview --> Renderers[Renderer packages]
  Renderers --> Stories[CSF stories and components]
  Addons[Addon ecosystem] --> Manager
  Addons --> Preview
  Tooling[CLI, codemods, automation] --> User
  QA[Ecosystem QA and test fixtures] --> Tooling
flowchart LR
  Config[User configuration] --> CoreServer[core-server]
  CoreServer --> Select[Framework and builder selection]
  Select --> Dev[Development mode]
  Select --> Build[Static build]
  Dev --> Manifests[Story and MDX manifests]
  Build --> Output[Static Storybook output]

Glossary

  • CSF: Component Story Format, the module format Storybook analyzes to identify stories and metadata.
  • Manager: The browser application that provides Storybook navigation, controls, settings, and addon panels.
  • Preview: The browser runtime that loads and renders selected stories.
  • Preset: A composable configuration layer used to select and configure Storybook features, frameworks, and builders.
  • Autoblock: CLI tooling that detects unsupported or incompatible project conditions and blocks or guides upgrades.

Codebase-wide invariants

  • Manager and preview communication uses shared channel contracts rather than direct runtime coupling; see code/core/src/manager/** and code/core/src/preview-api/**.
  • Core-server assembles behavior through presets and manifests, so framework and builder integrations must be selected through core configuration paths; see code/core/src/core-server/presets/** and code/core/src/core-server/utils/manifests/**.
  • Package-manager behavior is centralized behind the common package-manager abstraction; see code/core/src/common/js-package-manager/**.
  • Framework packages adapt applications while renderer packages own framework-facing preview rendering; see code/frameworks/** and code/renderers/**.
  • Repository upgrade safeguards are implemented in CLI tooling and must remain covered by tests; see code/lib/cli-storybook/src/autoblock/**.

Routing table