To run visual testing with Storybook, install the official @chromatic-com/storybook addon, connect a Chromatic project, create an initial visual-test build to establish baselines, then run tests after UI changes and review each difference before accepting it or fixing it. Add the visual check to CI so changes can be reviewed before merging.
What Storybook visual testing checks
Stories are the units under test. A visual test renders a story and compares its appearance with a previously accepted screenshot baseline. A difference flags a visual change for review; it does not decide whether that change is correct.
Storybook documents cross-browser visual testing through Chromatic, its cloud visual testing service, using the official @chromatic-com/storybook addon. The screenshots and change detection run in the cloud. See Storybook’s visual testing documentation.
Visual tests versus other Storybook tests
| Test type | Question it answers |
|---|---|
| Render test | Did the story render without an error? |
| Interaction test | Does the UI behave as expected when actions are simulated and assertions run, often through a story’s play function? |
| Visual test | Does the rendered appearance differ from the accepted baseline? |
| Accessibility or markup snapshot test | Does the story meet accessibility checks or match a markup snapshot? These are separate test types, not visual regression tests. |
A screenshot diff can reveal an unexpected layout or styling change, but it does not replace interaction assertions that verify behavior.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Set up Storybook visual tests
1. Install the official addon
From your project directory, run Storybook’s documented command:
npx storybook@latest add @chromatic-com/storybook
The addon is the documented integration for running Chromatic visual tests from Storybook. Check the project’s Storybook version and the current addon guidance if you are working in an older installation.
2. Link your Storybook project
- Start Storybook in your project.
- Open the Visual Tests panel. If your project uses the Vitest addon, look for the Visual Tests section in the testing widget.
- Sign in to Chromatic when prompted, then select an existing project or create one.
3. Establish the first baseline
Run the first visual-test build. It creates baseline snapshots for the project’s stories. Later runs compare newly rendered stories against those accepted baselines. Treat the first run as the reference point: inspect the resulting stories so the baseline represents the UI you intend to preserve.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Run tests and review visual changes
Run a check after a UI change
After changing a component or its styling, run visual tests from the Run button in the expanded testing widget or from the Visual Tests addon panel. The stories are sent to Chromatic for snapshots and visual-change detection.
Decide whether each difference is intentional
- Open a highlighted story and inspect the changed pixels in its diff.
- If the difference is an intended design change, accept it as the new baseline.
- If the difference is unexpected, fix the story or component, then rerun the visual tests.
Do not accept a diff merely because it is highlighted or because a build needs to be cleared. Acceptance changes what future runs treat as the expected appearance.
Add visual tests to CI
Run visual checks during development and in CI before a merge. Configure CI authentication with the project token, then use the pull-request or merge-request check to surface errors and changes that still need review. The appropriate token setup and CI configuration depend on your project and provider; follow the Chromatic CI documentation rather than committing a secret into source code.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
CI adds a review point before merge; it does not make visual judgment automatic. Someone still needs to inspect flagged differences and decide whether to accept the new appearance or fix a regression.
Choose the right test for the change
- Use visual tests when the concern is rendered appearance across stories.
- Use interaction tests when you need to simulate user actions and assert behavior.
- Run checks locally while developing to catch changes early, and in CI to review changes before merge.
- Accept a baseline only when the visual change is intentional; otherwise fix the cause and rerun.
Storybook test-runner compatibility
Avoid copying older @storybook/test-runner setup steps into a new visual-testing guide without checking compatibility. The official addon listing says support for the Storybook Test Runner has ended, points Vite-based projects toward Storybook’s Vitest integration, and specifies different compatible test-runner package versions for Storybook 6, 7, 8, 9, and 10. Check the listing for the version you use: @storybook/test-runner addon information.
For interaction tests, Storybook’s current guide describes using the Vitest addon through the Storybook UI, editor, CLI, or CI. That workflow is distinct from the Chromatic visual comparison workflow: Storybook interaction testing.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Troubleshoot common visual-testing problems
The addon command does not complete or the integration is missing
Confirm that you ran npx storybook@latest add @chromatic-com/storybook from the project directory and that Storybook starts. If the project uses an older Storybook release, consult the addon’s compatibility guidance rather than assuming the latest setup applies unchanged.
You cannot see the Visual Tests panel
Start the project’s Storybook after installing the addon. If you use the Vitest addon, check the testing widget for its Visual Tests section rather than looking only for a standalone panel.
The first run shows many differences
The first build establishes the baseline; it is not a comparison against a prior accepted set for that project. Review the rendered stories to confirm they show the intended UI before treating them as the reference.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteBest Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
A visual change appears in a later run
Open the highlighted story and inspect the diff. Accept the new baseline for an intentional change; for an unexpected change, fix the story or component and rerun.
CI cannot authenticate or reports a pending change
Check that CI has the project token configured securely and that the pull-request or merge-request check is connected to the intended project. A pending visual change needs review; a token issue needs a CI secret/configuration fix. Use Chromatic’s CI setup guidance for provider-specific steps.
Or skip the browser setup
Storybook visual regression tests compare stories with accepted baselines; ScreenshotNeo is a separate website screenshot API and MCP server, not a replacement for story-based tests or Chromatic diffs. For capturing a page screenshot with one GET request, use:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Cookie banners, newsletter popups and chat widgets are removed before capture; bot checks, blank pages, failed loads and cache hits are not billed. An MCP server provides screenshot tools for AI agents, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Frequently Asked Questions
Can a visual test prove that a UI works correctly?
No. It checks rendered appearance against a baseline. Use interaction tests with assertions to check behavior.
Does the first Storybook visual-test run compare against an existing baseline?
No. The initial build creates the project’s baseline snapshots; later runs compare against accepted baselines.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

