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

react-easy-panzoom

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-easy-panzoom

Wrapper to enable pan and zoom for any React component

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.5K
increased by59%
Maintainers
1
Weekly downloads
 
Created
Source

react-easy-panzoom

🚧 Please be advised that this library is currently under construction and might change quickly 🚧

Wrapper to enable pan and zoom features for any React component

Installation

react-panzoom requires React 16 or later.

Using npm:

npm install --save react-easy-panzoom

Using yarn:

yarn add react-easy-panzoom

Usage

import PanZoom from 'react-easy-panzoom'

// ...
render() {
  return (
    <PanZoom>
      { 'This content can be panned and zoomed' }
    </PanZoom>
  )
}

Properties

NameTypeDefaultDescription
autoCenterboolfalseAuto-center the view when mounting
autoCenterZoomLevelnumberSpecify the initial zoom level for auto-center
zoomSpeednumber1Sets the zoom speed
doubleZoomSpeednumber1.75Sets the zoom speed for double click
disabledboolfalseDisable pan and zoom
onPanStartfuncFired on pan start
onPanfuncFired on pan
onPanEndfuncFired on pan end
styleobjectOverride the inline-styles of the root element

License

The files included in this repository are licensed under the MIT license.

FAQs

Package last updated on 19 Mar 2019

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