See where the build drifted from the design.

Compare a Figma frame or mockup with your real app and get a visual diff report. Free, local, open source.

npx github:halilberkayy/designdrift design.png http://localhost:3000
The built pricing page The pricing page design
DesignBuild

A report you open in the browser

A static folder with index.html, the three images and result.json. Open it locally, attach it to a pull request as a CI artifact, or host it anywhere.

Designdrift report in diff mode with numbered regions
Slider
Drag between the design and the build.
Onion skin
Fade the build over the design to catch one-pixel shifts.
Diff
Changed pixels in red, darker ones in blue, anti-aliasing in yellow.
Regions
Changes grouped into numbered boxes. Click one to spotlight it.

Bring the design from anywhere

Either side of the comparison can be any of these.

InputExampleNotes
Image filedesign.pngPNG, JPEG, WebP, AVIF. Exports from Figma, Sketch, Penpot or Adobe XD work.
Web pagehttp://localhost:3000/pricingCaptured with Playwright at the design's size, fonts loaded, animations frozen.
Figma framefigma.com/design/…?node-id=12-34Exported through the Figma REST API with a personal access token in FIGMA_TOKEN.
Image URLhttps://cdn.example.com/mock.pngDownloaded as is.

Catch drift before review, in CI

Set a limit and Designdrift exits with code 1 when the build drifts past it. Upload the report so reviewers can see where.

# .github/workflows/design.yml (steps)
- run: npx playwright install --with-deps chromium
- run: npx github:halilberkayy/designdrift \
    design/pricing.png http://localhost:3000/pricing \
    --fail-above 1
- uses: actions/upload-artifact@v7
  if: always()
  with:
    name: designdrift-report
    path: designdrift-report
Retina against 1x

The build is scaled to the design's width. --scale 2 exports Figma and captures pages at 2x.

Clocks, avatars, ads

--ignore x,y,w,h skips regions that always change.

Noise

--threshold sets how different a color must be. Anti-aliased edges are ignored by default.

One component

--selector ".pricing-card" captures only that element.

Questions

How is this different from Percy, Chromatic or Playwright snapshots?

Those compare a page with its own earlier screenshots to catch regressions. Designdrift compares the page with the design it was built from, to catch places where it never matched. It runs locally, needs no account, and keeps no baseline history.

Can it compare a Figma design with my website?

Yes. Copy the frame's link (right-click, Copy link to selection), set a Figma personal access token as FIGMA_TOKEN, and pass the link and your page URL. The page is captured at the frame's size.

Does it work with Sketch, Penpot or a screenshot from a designer?

Yes. Any exported image works as the design side. Figma links are a shortcut, not a requirement.

How are drift regions found?

Pixels that differ are grouped on an 8-pixel grid and joined when they are close, so one moved button reads as one or two boxes, not hundreds of dots. Regions are sorted by how many pixels changed.

Is it pixel perfect or does it allow tolerance?

Both. The default color threshold ignores tiny rendering differences and anti-aliasing. Lower --threshold for stricter checks, or use --fail-above to allow a small percentage before failing.

Check your build against the design

npx github:halilberkayy/designdrift design.png http://localhost:3000