Loki captures and compares Storybook screenshots across updates to catch visual regressions. It targets headless, reproducible runs on CI across web and React Native targets.
Overview
Loki is a visual regression testing companion for Storybook. It compares rendered stories against stored reference images so UI changes show up as diffs instead of slipping through manual review.
The workflow assumes Storybook is already running: you record baselines with an update command, run tests after code changes, review outputs in a diff folder, then approve updates to refresh references. Loki does not start Storybook or simulators for you.
Rendering backends include Chrome inside Docker (recommended), Chrome on AWS Lambda, local Chrome, the iOS simulator, and the Android emulator, aligning with platforms Storybook supports. The project emphasizes easy setup, low ongoing fixture maintenance, OS-independent screenshots, and CI-friendly headless execution compared with older PhantomJS-based tools.
Configuration and CLI arguments are documented for React and React Native examples, with maintainers listing Joel Arvidsson as author and Tomas Echeverri Valencia as maintainer.
Key features
- Storybook screenshot baseline capture
- Visual diff on story changes
- Approve workflow to update references
- Chrome in Docker rendering target
- iOS simulator and Android emulator support
- CI-oriented headless execution
Use cases
- Catching UI regressions in Storybook
- Cross-platform React Native visual tests
- Automated screenshot checks in CI
Does the same job as
Loki doesn't name these products itself, but its own description shows it does the same job.