0.1.1 • Published 6 years ago
react-touch-zoom v0.1.1
react-touch-zoom
Zoom and pan into any content on a touch device.
- Zoom with two fingers
- Pan with one finger
- Double tap to reset
⚠️ This is still a very rough version. Use at your own risk!
Usage
Simply wrap any HTML in a <Zoom />
container.
<Zoom height={600}>
<img src="https://source.unsplash.com/random/800x600" />
</Zoom>
height
(number, required) - Height of the containermaxZoom
(number, default:8
) - The maximum zoom valuedisabled
(boolean) - Whether to disable zoominghandleZoom
(function) - Callback whenever the zoom value has been changed