What is Chromatic?
Chromatic is a visual regression testing platform built on Storybook. It takes screenshots of every story on every commit and compares them with the previous version to detect unexpected visual changes.
How it works
- Upload your Storybook to Chromatic (
npx chromatic). - Chromatic takes screenshots of every story at multiple resolutions.
- Compares screenshots with the baseline.
- Detects pixel-level differences.
- Marks changes for team review.
Installation
npm install --save-dev chromatic
npx chromatic --project-token=<token>
CI integration
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
Benefits
- Detects visual changes that functional tests miss.
- Collaborative visual review in PRs.
- Visual design change history.
- Direct Storybook integration.
Want visual regression testing? At Vynta we integrate Chromatic in your UI pipeline.