Skip to content

Repository files navigation

image-compare

NPM versionBuild StatusRenovate

A tiny, zero-dependency web component for comparing two images using a slider. Built with a focus on accessibility, performance, and progressive enhancement.

View the full documentation or check it out on npm.

Tests

npm test# build, then run everything once
npm run test:watch # re-run on change

Because every dependency here is build tooling, the suite is aimed at the things a dependency upgrade could quietly break:

  • test/browser/ runs the component's behavior in headless Chromium — twice. Once against src/index.js, and once against the minified dist/index.min.js that consumers actually load, so a bad minify release fails the build instead of shipping.
  • test/build/ checks the published artifacts: that dist/ matches the source, and that the generated manifests still describe the element's attributes, slots, and CSS custom properties.

About

A web component for comparing images with a slider.

Resources

Stars

144 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages