Loki
Visual regression testing for Storybook — snapshot every story across browsers and viewports.
Pricing
Free / Open source
Type
Automation
Languages
JavaScript
// VERDICT
Reach for Loki when you use Storybook and want free, self-run visual regression against your own baselines. Skip it when you want a managed service with review workflows (Chromatic), AI diffing (Applitools), or you're not on Storybook.
Best for
Open-source visual regression testing for Storybook - capturing and diffing component snapshots locally/CI against baselines, a free self-run alternative to hosted Storybook visual services.
Avoid when
You want a managed cloud service with review workflows (Chromatic), AI diffing (Applitools), or you don't use Storybook.
CI/CD fit
CLI + Storybook · headless/Docker rendering · CI with baselines
Languages
JavaScript
Team fit
Storybook teams wanting free visual testing · Self-hosted CI · Frontend QA
Setup
Maintenance
Learning
Licence
// BEST FOR
- Free, open-source visual regression for Storybook
- Snapshotting and diffing component stories
- Self-run locally and in CI with your baselines
- Consistent rendering via Docker
- No per-snapshot cloud cost
- Catching component visual regressions
// AVOID WHEN
- You want a managed service with review workflows (Chromatic)
- AI diffing that suppresses noise is needed (Applitools)
- You don't use Storybook
- You don't want to manage baselines
- False positives from pixel diffs are a concern
- Minimal setup is the priority
// QUICK START
npm install -D loki
npx loki update # capture baselines (Docker for consistency)
npx loki test # diff in CI// ALTERNATIVES TO CONSIDER
| Tool | Choose it when |
|---|---|
| Chromatic | You want a managed Storybook visual service with review workflows. |
| BackstopJS | You want free visual regression beyond Storybook. |
| Percy | You want a managed cross-framework visual platform. |
// FEATURES
- Storybook-native — snapshots every story automatically
- Chrome, Firefox, and iOS Simulator targets
- Configurable viewports and CSS animation handling
- Approve/update workflow via CLI
- Docker support for deterministic rendering
- Hooks for pre-snapshot setup
// PROS
- Self-hosted Storybook visual testing for free
- Component-level coverage with minimal config
- Good fit for design systems
// CONS
- Storybook required
- Slower CI runs at scale than cloud-based alternatives
- Maintenance pace less active than Chromatic
// EXAMPLE QA WORKFLOW
Add Loki to the Storybook project
Capture reference images (Docker)
Run snapshot diffs in CI
Triage diffs vs noise
Approve and update baselines
Manage baseline storage
// RELATED QA.CODES RESOURCES
Glossary
Practice