Description coming soon.
https://alecrios.github.io/image-loupe-js/
- Lightweight
- No dependencies
- Performant
- Animates only
transform
andopacity
- Utilizes the
requestAnimationFrame
API
- Animates only
- Customizable
- Very minimal CSS
- Easy to change loupe size, border, shadow, etc
This project is still under development and not production-ready. It is written in ES2015, so it needs to be compiled with something like Babel for better browser support.
- Include
image-loupe.css
.
<link href="css/image-loupe.css" rel="stylesheet">
- Include
image-loupe.js
.
<script src="js/image-loupe.js"></script>
- Add the
data-loupe-image
attribute to an<img>
.
<img src="img/fruit.jpg" data-loupe-image>