All Projects → retyui → react-quick-pinch-zoom

retyui / react-quick-pinch-zoom

Licence: other
A react component that providing multi-touch gestures for zooming and dragging on any DOM element.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to react-quick-pinch-zoom

React Prismazoom
A pan and zoom component for React, using CSS transformations.
Stars: ✭ 29 (-76.61%)
Mutual labels:  react-component, zoom, pinch-to-zoom
Stfalconimageviewer
A simple and customizable Android full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" gestures
Stars: ✭ 1,734 (+1298.39%)
Mutual labels:  zoom, pinch-to-zoom
Photo view
📸 Easy to use yet very customizable zoomable image widget for Flutter, Photo View provides a gesture sensitive zoomable widget. Photo View is largely used to show interacive images and other stuff such as SVG.
Stars: ✭ 1,280 (+932.26%)
Mutual labels:  zoom, pinch-to-zoom
Pinchimageview
体验非常好的Android图片手势控件。
Stars: ✭ 1,871 (+1408.87%)
Mutual labels:  zoom, pinch-to-zoom
Zoom
Javascript library to do pinch zoom that preserves scale and rotation correctly.
Stars: ✭ 130 (+4.84%)
Mutual labels:  zoom, pinch-to-zoom
Zoomy
Zoomy is an easy to use pinch-to-zoom Android library
Stars: ✭ 842 (+579.03%)
Mutual labels:  zoom, pinch-to-zoom
Frescoimageviewer
Customizable Android full screen image viewer for Fresco library supporting "pinch to zoom" and "swipe to dismiss" gestures. Made by Stfalcon
Stars: ✭ 1,807 (+1357.26%)
Mutual labels:  zoom, pinch-to-zoom
React Native Image View
Modal component to view images with zoom
Stars: ✭ 273 (+120.16%)
Mutual labels:  zoom, pinch-to-zoom
Atgmediabrowser
Image slide-show viewer with multiple predefined transition styles, with ability to create new transitions with ease.
Stars: ✭ 186 (+50%)
Mutual labels:  zoom, pinch-to-zoom
Zoomage
A simple pinch-to-zoom ImageView library for Android
Stars: ✭ 211 (+70.16%)
Mutual labels:  zoom, pinch-to-zoom
react-pinch-and-zoom
A react container component with pinch-to-zoom gesture interaction.
Stars: ✭ 33 (-73.39%)
Mutual labels:  react-component, pinch-to-zoom
React Native Zoomable View
A view component for react-native with pinch to zoom, tap to move and double tap to zoom capability.
Stars: ✭ 152 (+22.58%)
Mutual labels:  zoom, pinch-to-zoom
React Magnifier
🔍 React image zoom component
Stars: ✭ 116 (-6.45%)
Mutual labels:  react-component, zoom
react-instagram-zoom-slider
🌄↔️ A slider component with pinch to zoom capabilities inspired by Instagram
Stars: ✭ 67 (-45.97%)
Mutual labels:  zoom, pinch-to-zoom
react-compare-slider
A slider component to compare any two React components in landscape or portrait orientation. It supports custom images, videos... and everything else.
Stars: ✭ 78 (-37.1%)
Mutual labels:  react-component
markdown-navbar
Best markdown navigation bar for React.
Stars: ✭ 122 (-1.61%)
Mutual labels:  react-component
win95-media-player
💿 Back from 1995, and running on your website
Stars: ✭ 56 (-54.84%)
Mutual labels:  react-component
zoom-go
A command line tool for joining your next Zoom meeting.
Stars: ✭ 34 (-72.58%)
Mutual labels:  zoom
react-form-base
Base React component for generic forms
Stars: ✭ 18 (-85.48%)
Mutual labels:  react-component
react-fake-component
Chuck Norris faking components
Stars: ✭ 24 (-80.65%)
Mutual labels:  react-component

react-quick-pinch-zoom

react-quick-pinch-zoom on npm npm downloads react-quick-pinch-zoom bundle size Code quality

A react component that lets you zooming and dragging on any DOM element using multi-touch gestures on mobile devices and mouse-events\wheel on desktop devices. Based on this module manuelstofer/pinchzoom

Component features:

  • 🔮 Simple. Easy to use;
  • 🍎 It works with mobile touch gestures and desktop mouse events;
  • Fast, 60 FPS on mobile devices.

Links

Install

yarn add react-quick-pinch-zoom

Screenshots

Video...

Usage

import React, { useCallback, useRef } from "react";
import QuickPinchZoom, { make3dTransformValue } from "react-quick-pinch-zoom";

const IMG_URL =
  "https://user-images.githubusercontent.com/4661784/" +
  "56037265-88219f00-5d37-11e9-95ef-9cb24be0190e.png";

export const App = () => {
  const imgRef = useRef();
  const onUpdate = useCallback(({ x, y, scale }) => {
    const { current: img } = imgRef;

    if (img) {
      const value = make3dTransformValue({ x, y, scale });

      img.style.setProperty("transform", value);
    }
  }, []);

  return (
    <QuickPinchZoom onUpdate={onUpdate}>
      <img ref={imgRef} src={IMG_URL} />
    </QuickPinchZoom>
  );
};

License

MIT © retyui

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].