Gathering detailed insights and metrics for react-cropper
Gathering detailed insights and metrics for react-cropper
Gathering detailed insights and metrics for react-cropper
Gathering detailed insights and metrics for react-cropper
@types/react-cropper
TypeScript definitions for react-cropper
react-advanced-cropper
The react cropper library that gives the possibility to create croppers exactly suited for your website design
dnm-react-smartcroppr
React cropper based on dnm-smartcroppr
@synapsestudios/react-drop-n-crop
A combined implementation of react-dropzone and react-cropper
npm install react-cropper
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
2,031 Stars
601 Commits
270 Forks
17 Watching
14 Branches
25 Contributors
Updated on 23 Nov 2024
Minified
Minified + Gzipped
TypeScript (77.48%)
JavaScript (20.08%)
HTML (2.44%)
Cumulative downloads
Total Downloads
Last day
0.5%
39,984
Compared to previous day
Last week
4.6%
195,516
Compared to previous week
Last month
7%
810,217
Compared to previous month
Last year
17.6%
8,326,739
Compared to previous year
1
1
50
Cropperjs as React component
Install via npm
1npm install --save react-cropper
You need cropper.css
in your project which is from cropperjs.
Since this project have dependency on cropperjs, it located in /node_modules/react-cropper/node_modules/cropperjs/dist/cropper.css
or node_modules/cropperjs/dist/cropper.css
for npm version 3.0.0
later
1import React, { useRef } from "react"; 2import Cropper, { ReactCropperElement } from "react-cropper"; 3import "cropperjs/dist/cropper.css"; 4 5const Demo: React.FC = () => { 6 const cropperRef = useRef<ReactCropperElement>(null); 7 const onCrop = () => { 8 const cropper = cropperRef.current?.cropper; 9 console.log(cropper.getCroppedCanvas().toDataURL()); 10 }; 11 12 return ( 13 <Cropper 14 src="https://raw.githubusercontent.com/roadmanfong/react-cropper/master/example/img/child.jpg" 15 style={{ height: 400, width: "100%" }} 16 // Cropper.js options 17 initialAspectRatio={16 / 9} 18 guides={false} 19 crop={onCrop} 20 ref={cropperRef} 21 /> 22 ); 23};
string
null
1<Cropper src="http://fengyuanchen.github.io/cropper/images/picture.jpg" />
string
picture
string
null
https://github.com/fengyuanchen/cropperjs#dragmode
https://github.com/fengyuanchen/cropperjs#scalexscalex
https://github.com/fengyuanchen/cropperjs#scalexscaley
https://github.com/fengyuanchen/cropperjs#enable
https://github.com/fengyuanchen/cropperjs#disable
https://github.com/fengyuanchen/cropperjs#zoomto
https://github.com/fengyuanchen/cropperjs#rotateto
Accept all options in the docs as properties.
Use the cropper
instance from onInitialized
to access cropperjs methods
1npm run build
1npm start
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 1/15 approved changesets -- score normalized to 0
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
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
15 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