Image Snapshot integration

Capture and compare image snapshot automatically and manually

View on GithubNew to Storybook?Get started

visual-testing

Release

Image snapshot testing for Vitest Browser Mode and Storybook: capture and compare image snapshots automatically and manually.

Package What it is for npm Docs
storybook-addon-vis Capturing and comparing image snapshots of your stories, automatically and manually, from Storybook Vitest addon tests. npm Storybook addon
vitest-plugin-vis Capturing and comparing image snapshots in tests that run in Vitest Browser Mode, without Storybook. npm Vitest plugin

Which one do I need

If you test your stories with Storybook, use storybook-addon-vis. It uses vitest-plugin-vis internally to do the heavy lifting. If you do not use Storybook and write tests in Vitest Browser Mode directly, use vitest-plugin-vis, which was extracted from the addon to be used directly in Vitest.

The Primary story in the light theme: a blue pill button labelled Button at the top left of a white 960 by 720 canvas.

A committed baseline image, one of the snapshots the showcase displays.

Links

For AI agents

llms.txt lists the entry points and documentation pages of both packages. Each package ships a copy as llms.txt in its npm package.

Made by
  • unional
    unional
Work with
    Angular
    Ember
    HTML
    Preact
    React
    React native
    Svelte
    Vue
    Web Components