Medium-zoom – a JavaScript library for zooming images

Medium-zoom – a nice JavaScript library for zooming images like @ Medium portal.

Zooming images with medium-zoom library

Zoom images with nice effect, similar to Medium.

Features

– Responsive — scale on mobile and desktop

– Fast and lightweight — should be able to reach 60 fps

– Flexibility — apply the zoom to a selection of images

– High definition support — load the HD version of your image on zoom

– Event handling — trigger events when the zoom enters a new state

– Mouse, keyboard and gesture friendly

– Customization — set your own margin, background and scroll offset

– Pluggable — add your own features to the zoom

– Custom templates — extend the default look to match the UI of your app

and more.

Also check out this interesting article:

https://francoischalifour.com/medium-image-zoom

There is rich API available for the developer. More details here.

Medium-zoom - a JavaScript library for zooming images
Medium-zoom – a JavaScript library for zooming images

Setup

npm install medium-zoom
# or
yarn add medium-zoom

Usage

import mediumZoom from 'medium-zoom';


// Apply
mediumZoom('[data-zoomable]')

License: MIT

Demos

https://medium-zoom.francoischalifour.com

GitHub

https://github.com/francoischalifour/medium-zoom

See also

jQuery pan and zoom image plugin – Smart Zoom

Leroy Zoom – A lightweight jQuery image zoom and magnifier plugin

JS video and photo gallery – blueimp

Enjoy!