Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cyberdas/react-instagram-zoom

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cyberdas/react-instagram-zoom

React component that implements Instagram-like zoom for mobile

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-instagram-zoom

React component that implements Instagram-like zoom for mobile. No dependencies.

Same module is available for angular here: ngx-instagram-zoom

NPM JavaScript Style Guide

Install

npm install --save react-instagram-zoom

Demo

  • Open this CodeSandbox example in mobile to try it:

https://codesandbox.io/s/react-instagram-zoom-7c1wl

Usage

  • Wrap anything you want to make zoomable with <Zoomable></Zoomable> tags.
  • It can zoom in any content (not only images) that css transform can be applied to.
<Zoomable>
    <img
      src="https://github.com/AlexSapoznikov/react-instagram-zoom/blob/master/example/public/cat.png?raw=true"
      alt="Cat"
    />
</Zoomable>

Docs

PropsTypeDefaultDescription
releaseAnimationTimeoutnumber500Animation speed for restoring original size of the image when user lifts up fingers.
maxScalenumberNumber.MAX_SAFE_INTEGERMax zoom. For example value of 1 won't allow zooming in, value of 2 allows to zoom up to 100%.
zIndexnumberNumber.MAX_SAFE_INTEGERz-index that is applied when zooming in.
styleobject{}Allows to add style to Zoomable component.
classNamestringundefinedAllows to add className to Zoomable component

Events

onReleaseAnimationStartTouchEventundefinedEvent when release animation starts
onReleaseAnimationEndTouchEventundefinedEvent when release animation ends
onTouchStartTouchEventundefinedEvent when touch starts
onTouchMoveTouchEventundefinedEvent when touch is in process
onTouchEndTouchEventundefinedEvent when touch ends

License

MIT © https://github.com/AlexSapoznikov/react-instagram-zoom

Keywords

FAQs

Package last updated on 29 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc