Gathering detailed insights and metrics for @kokarn/react-zoom-pan-pinch
Gathering detailed insights and metrics for @kokarn/react-zoom-pan-pinch
Gathering detailed insights and metrics for @kokarn/react-zoom-pan-pinch
Gathering detailed insights and metrics for @kokarn/react-zoom-pan-pinch
npm install @kokarn/react-zoom-pan-pinch
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1,539 Stars
407 Commits
274 Forks
10 Watching
8 Branches
44 Contributors
Updated on 26 Nov 2024
Minified
Minified + Gzipped
TypeScript (83.28%)
MDX (14.26%)
JavaScript (1.18%)
CSS (1.16%)
HTML (0.12%)
Cumulative downloads
Total Downloads
Last day
-33.8%
51
Compared to previous day
Last week
-15.1%
286
Compared to previous week
Last month
-31.9%
2,441
Compared to previous month
Last year
-28.2%
33,271
Compared to previous year
45
Super fast and light react npm package for zooming, panning and pinching html elements in easy way
Do you like this library? Try out other projects
⚡Hyper Fetch - Fetching and realtime data exchange framework.
1npm install --save react-zoom-pan-pinch 2or 3yarn add react-zoom-pan-pinch
1import React, { Component } from "react"; 2 3import { TransformWrapper, TransformComponent } from "react-zoom-pan-pinch"; 4 5const Example = () => { 6 return ( 7 <TransformWrapper> 8 <TransformComponent> 9 <img src="image.jpg" alt="test" /> 10 </TransformComponent> 11 </TransformWrapper> 12 ); 13};
or
1import React, { Component } from "react"; 2 3import { 4 TransformWrapper, 5 TransformComponent, 6 useControls, 7} from "react-zoom-pan-pinch"; 8 9const Controls = () => { 10 const { zoomIn, zoomOut, resetTransform } = useControls(); 11 12 return ( 13 <div className="tools"> 14 <button onClick={() => zoomIn()}>+</button> 15 <button onClick={() => zoomOut()}>-</button> 16 <button onClick={() => resetTransform()}>x</button> 17 </div> 18 ); 19}; 20 21const Example = () => { 22 return ( 23 <TransformWrapper 24 initialScale={1} 25 initialPositionX={200} 26 initialPositionY={100} 27 > 28 {({ zoomIn, zoomOut, resetTransform, ...rest }) => ( 29 <> 30 <Controls /> 31 <TransformComponent> 32 <img src="image.jpg" alt="test" /> 33 <div>Example text</div> 34 </TransformComponent> 35 </> 36 )} 37 </TransformWrapper> 38 ); 39};
MIT © prc5
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 20/30 approved changesets -- score normalized to 6
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
37 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More