Description
react-cropper is a React component that wraps Cropper.js, a JavaScript library for cropping images in the browser. You use it as a React component, passing the image source and the Cropper.js options as props, so you can add an image cropper to a React application without wiring up the library by hand. It is installed from npm, and it needs the cropper.css file that comes with Cropper.js in your project. The README gives the location of that file in node_modules. The component accepts the image's src, alt and crossOrigin attributes, and the Cropper.js options such as dragMode, scaleX, scaleY, enable, disable, zoomTo and rotateTo, which the README links to the Cropper.js documentation. Any other option in the Cropper.js docs can be passed as a property. To call Cropper.js methods, you use the cropper instance that the onInitialized callback provides. The README has a quick example and a link to a live demo. The project is licensed under MIT, its author is Fong Kuanghuei, and it is maintained by Shubhendu Shekhar.…
Highlights
- Cropper.js as a React component
- Passes Cropper.js options as props
- Access to cropper methods through onInitialized
- Installs from npm
- Live demo and docs
- MIT licensed
Ratings & Reviews
No ratings yet
Be the first to rate react-cropper.
People also visit

vue-advanced-cropper
An advanced cropper that gives you opportunity to create almost any cropper
react-cropper FAQ
What is react-cropper?
A React component that wraps Cropper.js for cropping images in the browser.
How do I install it?
Install it from npm, and include the cropper.css file from Cropper.js in your project, as the README describes.
How do I call cropper methods?
Use the cropper instance that the onInitialized callback gives you.
Which options can I set?
The src, alt and crossOrigin attributes, plus Cropper.js options such as dragMode, scaleX, scaleY, zoomTo and rotateTo. Any other Cropper.js option can be passed as a property.
Is it free?
Yes. It is licensed under MIT.
Is there a demo?
Yes. The README links a live demo and the Cropper.js documentation.
What are the best react-cropper alternatives?
Popular alternatives to react-cropper include react-image-crop, vue-croppie and vue-advanced-cropper. See all react-cropper alternatives




















