Skip to content

Catch visual bugs before your users do

Automated screenshot comparison for your CI/CD pipeline. Detect unintended UI changes with pixel-perfect accuracy.

CI/CD ReadyPixel DiffFull PageMulti-Viewport
import { Stack0 } from '@stack0/sdk'
const stack0 = new Stack0({ apiKey: process.env.STACK0_API_KEY })
// Capture screenshots for visual testing
export async function captureBaseline(pages: string[]) {
const screenshots = await Promise.all(
pages.map(async (path) => {
const { imageUrl } = await stack0.screenshot.capture({
url: `${process.env.APP_URL}${path}`,
viewport: { width: 1280, height: 800 },
fullPage: true,
// Wait for animations to complete
waitForSelector: '[data-testid="page-loaded"]',
})
return { path, imageUrl }
})
)
return screenshots
}
// Compare screenshots in CI
export async function compareScreenshots(
baseline: Screenshot[],
current: Screenshot[]
) {
const diffs = await stack0.screenshot.compare({
baseline: baseline.map(s => s.imageUrl),
current: current.map(s => s.imageUrl),
threshold: 0.1, // 0.1% pixel difference allowed
})
return diffs.filter(d => d.diffPercentage > 0)
}

What's included

Screenshot Capture

Reliable screenshots with wait conditions. Capture after animations complete.

Diff Detection

Pixel-by-pixel comparison with configurable thresholds.

CI/CD Ready

GitHub Actions, GitLab CI, Jenkins. Integrates with your workflow.

Multiple Viewports

Test responsive designs. Mobile, tablet, desktop in one run.

Baseline Management

Update baselines when changes are intentional. Version with your code.

Fast Capture

Parallel screenshot capture. Full test suite in seconds.

Built for production

Catch regressions

Detect unintended visual changes before they ship. CSS breaks, layout shifts, missing elements.

CI/CD integration

Run visual tests on every PR. Block merges when visual regressions are detected.

Pixel-perfect comparison

Configurable diff thresholds. Ignore anti-aliasing, catch real changes.

Full page capture

Capture entire scrollable pages. Test every part of your UI.

Multiple viewports

Test mobile, tablet, and desktop simultaneously. Catch responsive bugs.

Simple pricing

$1 per 1,000 screenshots. No per-comparison fees.

Common implementations

PR Validation

Block PRs that introduce unintended visual changes.

Cross-browser Testing

Compare renders across Chrome, Firefox, and Safari.

Design QA

Verify implementations match design specs pixel-perfectly.

Refactoring Safety

Refactor CSS with confidence. Visual tests catch regressions.

Frequently asked questions

Ready to build?

Get started in minutes.

Get Started