Skip to content

Features

This page is an index. Each row names a capability and links to the page that shows how to use it. The concepts behind them are in Visual testing.

Feature In one line Guide
Automatic snapshots Every story with the snapshot tag is captured at the end of its test. Automatic snapshots
Per-story opt out !snapshot turns a story off, like !test. Automatic snapshots
Manual snapshots expect(element).toMatchImageSnapshot() in a play function, on the page or on one element. Manual snapshots
Existence check hasImageSnapshot() tells a story whether its baseline exists. Manual snapshots
CSF Next Setup in the preview with addonVis(), and snapshots of stories with story.test(). CSF Next and story.test()
Chrome DevTools Protocol cdp() works inside stories under Playwright and Chromium. Chrome DevTools Protocol
Feature In one line Guide
Themes One baseline per theme from one story. Themes
Viewports and instances One baseline folder per browser instance. Viewports and multiple instances
Feature In one line Guide
Thresholds Tolerate a number or percentage of different pixels, globally, per story or per call. Thresholds and comparison
Pixel and SSIM comparison Pick the algorithm per project, story or call. Thresholds and comparison
Vis panel Baseline, result and diff of a story inside Storybook, with swipe and onion skin. The Vis panel
Review image A failure writes a side-by-side crop of each changed region and a regions file. Reviewing failures
Agent review A skill and an llms.txt help coding agents read failures cheaply. Reviewing failures with agents
Feature In one line Guide
Custom snapshot paths Choose the root and subpath of the snapshot folders. Monorepos and custom snapshot paths
Several Vitest projects The panel combines the snapshots of every project. Monorepos and custom snapshot paths
Platform baselines CI writes to __vis__/<platform>, your machine to __vis__/local. CI
Storybook 10.3+ annotations Provide the annotations from the preview. Configuration