mrkeyoor.com_
Wed 23 Sept 00:37 UTC
npmTestingupdated 22 Sept 2026

@chromatic-com/storybook review

@chromatic-com/storybook 5.3.0 puts Chromatic visual testing inside Storybook 10.1 and later. Its panel uploads rendered stories to Chromatic, compares browser snapshots against accepted baselines, and brings the review result back beside the component. Modes can capture the same story under different themes, globals, or viewports. Quick Share can publish a temporary Storybook for review. The package is a client for Chromatic's hosted service, so it does not provide an offline pixel-diff runner. Our sandbox produced a 60.9 KB minified browser bundle, or 21.6 KB gzipped, for a namespace import.

Verdict

@chromatic-com/storybook 5.3.0 installed in 26.2 seconds and produced a 21.6 KB gzipped namespace bundle in our sandbox, but every useful visual test still depends on a Chromatic account and hosted build. Install it for Storybook 10 teams that want Chromatic review in the panel; choose Loki or narrower Storybook test addons when hosted pixel baselines are the wrong test boundary.

We installed it

Lab card: what happened when we installed @chromatic-com/storybookScreenshot of @chromatic-com/storybook documentation
Install✓ · 26.2s82 packages on disk · 66 MB
ImportESM import works · require() works · CommonJS package with exports map
Browser21.6 KBgzipped (60.9 KB minified), bundled with esbuild
Typesno TypeScript types found
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)

Answers from our run

Does @chromatic-com/storybook install cleanly?

Yes. In a fresh container with an empty cache, npm install @chromatic-com/storybook finished in 26 seconds, leaving 82 packages and 66 MB on disk. npm audit reported no known vulnerabilities.

How much does @chromatic-com/storybook add to a browser bundle?

21.6 KB gzipped (60.9 KB minified) when the whole package is bundled for the browser with esbuild. Importing only part of it is usually smaller.

Does @chromatic-com/storybook work with both ESM and CommonJS?

Yes. Both import '@chromatic-com/storybook' and require('@chromatic-com/storybook') worked in Node 22 in our run. The package is published as CommonJS with an exports map.

Does @chromatic-com/storybook include TypeScript types?

No type declarations were found in our install, so TypeScript users need their own declarations.

@chromatic-com/storybook or chromatic: which should you use?

chromatic: Use the CLI when visual builds belong only in CI and nobody needs the Storybook panel. @chromatic-com/storybook 5.3.0 installed in 26.2 seconds and produced a 21.6 KB gzipped namespace bundle in our sandbox, but every useful visual test still depends on a Chromatic account and hosted build.

When should you not use @chromatic-com/storybook?

Stories cannot leave your network. The README requires a Chromatic account and project access, and the addon sends builds to the hosted service.

API stability3/5Version 5.3.0 keeps story controls such as disableSnapshot, delay, diffThreshold, ignoreSelectors, media emulation, and modes, but the addon major follows Storybook closely. Addon 4 targets Storybook 9, while addon 5 peers with Storybook 10.1 and later 10.x versions. The numeric viewports option is deprecated in favor of modes, so a Storybook upgrade can require config edits as well as a package bump.
Docs3/5The README shows the one-command install, manual config, account prerequisite, and a concrete Yarn 1 ERR_REQUIRE_ESM workaround. The linked Chromatic guide explains story parameters and the hosted workflow. Compatibility guidance is inconsistent, though: the README says Storybook 7.6 or later, while version 5.3.0's published peer range starts at 10.1. Readers must check package metadata before following the quick start.
Maintenance5/5Release 5.3.0 shipped on August 6, 2026, and the repository was pushed again on August 24 for a prerelease fix that lazily loads chromatic/node. The repository is unarchived and reports 24 open issues and pull requests. Recent 5.3.0 work also fixed premature Git errors, device-pixel-ratio sizing, and dependency updates, which are specific maintenance signals for the current Storybook integration.
Ecosystem4/5The npm downloads endpoint counted 5,559,944 downloads in the latest week, and the addon feeds Storybook stories into Chromatic's browser, baseline, review, and sharing workflow. The package has one Storybook peer and its current compatibility range is narrow. Its ecosystem value therefore depends on already choosing both Storybook and Chromatic rather than on support for interchangeable visual-test backends.

Use it if

  • Your team already runs Storybook 10.1 or later and wants visual changes reviewed from its addon panel.
  • Chromatic should own browser capture, baseline storage, branch comparison, and reviewer approval.
  • A story must be checked under several themes, global settings, media modes, or viewport presets.
  • Reviewers need a temporary hosted Storybook without building the branch on their own machines.
Skip it if

Setup reality

We installed @chromatic-com/storybook 5.3.0 in 26.2 seconds in a fresh Node 22 container. The install left 82 packages and 66 MB on disk. npm audit found 0 known vulnerabilities. The package itself has 4 direct dependencies, one Storybook peer, and 780 KB unpacked. It is CommonJS with an exports map; both require() and ESM import worked. Our scan found no TypeScript types.

The shortest setup is npx storybook add @chromatic-com/storybook, which installs the addon and updates Storybook config. Manual setup puts the package in .storybook/main.ts under addons. Version 5.3.0 accepts Storybook 10.1 through the listed 10.x prerelease lines and requires Node 20 or newer. Do not rely on the README's old claim that Storybook 7.6 is enough for this major.

A Chromatic account and access to a project are required before the panel can run a visual test. CI also needs the Chromatic project token or project configuration used by the underlying CLI. Keep the token in the CI secret store. Quick Share uploads the built Storybook, so check stories for internal data before creating a link.

Snapshots expose nondeterminism in fonts, animation, random values, live clocks, and network responses. Modes are the current way to vary themes and viewports; the older viewports option is deprecated. Delay waits a fixed number of milliseconds and slows each capture, while ignoreSelectors paints matched regions before comparison. An import-all browser build measured 60.9 KB minified and 21.6 KB gzipped, but application code should not import this addon at runtime.

Patterns

Configure the addon with Storybook CLI install-addon

npx storybook add @chromatic-com/storybook

Version 5.3.0 needs Node 20 or newer and a Storybook version in its 10.1 through 10.x peer range.

Register the addon by hand configure-manually

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

const config: StorybookConfig = {
  stories: ['../src/**/*.stories.@(ts|tsx)'],
  addons: ['@chromatic-com/storybook'],
};

export default config;

The addon goes in Storybook configuration. It should not be imported by the application bundle.

Leave a changing story out of snapshots skip-one-snapshot

export const LiveClock = {
  parameters: { chromatic: { disableSnapshot: true } },
};

disableSnapshot leaves the story visible in Storybook while excluding it from Chromatic capture.

Disable snapshots for a story file skip-component-snapshots

const meta = {
  component: StreamingChart,
  parameters: { chromatic: { disableSnapshot: true } },
};

export default meta;

Metadata parameters apply to every story in the file unless an individual story overrides them.

Test light and dark globals capture-theme-modes

export const ButtonModes = {
  parameters: {
    chromatic: {
      modes: {
        light: { theme: 'light' },
        dark: { theme: 'dark' },
      },
    },
  },
};

Each mode key must match a Storybook global that the preview or a decorator actually reads.

Wait for late rendering delay-capture

export const LoadedProfile = {
  parameters: { chromatic: { delay: 500 } },
};

The value is milliseconds. A 500 ms delay applies to every capture of this story and cannot make random output deterministic.

Ignore selected DOM regions mask-dynamic-region

export const Dashboard = {
  parameters: {
    chromatic: { ignoreSelectors: ['[data-live-clock]'] },
  },
};

Matched elements are painted before comparison, so a selector can hide a real regression if it covers too much of the story.

Adjust pixel sensitivity set-diff-threshold

export const CanvasChart = {
  parameters: { chromatic: { diffThreshold: 0.1 } },
};

The accepted range is 0 to 1. Higher values tolerate more difference, and the documented default is 0.063.

Compare anti-aliased pixels include-antialiasing

export const TypeSpecimen = {
  parameters: { chromatic: { diffIncludeAntiAliasing: true } },
};

The default is false. Turning it on can reveal font changes and can also increase browser-specific noise.

Capture reduced-motion CSS emulate-reduced-motion

export const ReducedMotionMenu = {
  parameters: { chromatic: { prefersReducedMotion: 'reduce' } },
};

This changes the capture's media feature to reduce; the component must still implement the matching CSS or script behavior.

Render the print media query capture-print-css

export const PrintableInvoice = {
  parameters: { chromatic: { media: 'print' } },
};

A print capture does not cover the normal screen rendering, so keep a separate story or mode for that state.

Limit the image to the viewport crop-to-viewport

export const MobileDialog = {
  parameters: { chromatic: { cropToViewport: true } },
};

Use modes for different viewport globals. The older numeric viewports array is deprecated in the current parameter types.

Alternatives

PackageRegistryPick it when
chromaticnpmUse the CLI when visual builds belong only in CI and nobody needs the Storybook panel.
lokinpmUse it when screenshot capture and baselines must stay local or on infrastructure you manage.
@storybook/test-runnernpmUse it for story and play-function assertions where pixel comparison is beside the point.
@storybook/addon-a11ynpmUse it to catch accessibility violations that a screenshot comparison cannot diagnose.

More testing guides

pytest · chai · jsdom · vitest · playwright · coverage · the whole shelf →

How this guide is made: grounded in the library's documentation, release notes, changelog, and issue history, on a fixed rubric — not a hands-on install of every release. The 50 most-downloaded entries are additionally install-verified in clean containers. Corrections: contact the desk.