Description
react-image-crop is a React component for cropping images, with no dependencies and a small footprint. It lets people choose a crop area on an image in the browser, using a responsive layout that can size the crop in pixels or percentages. The crop works with touch, so it is usable on phones and tablets, and it supports free-form crops or fixed aspect ratios, for example a square avatar or a banner shape. It is fully keyboard accessible, so people who do not use a pointer can still set the crop. The library's documentation covers installation through npm and a CDN, the props that control the crop, and example code that shows a controlled crop that updates as the user moves it. Its FAQ answers common questions: how to generate a preview of the crop in the browser, how to correct images whose EXIF orientation or rotation is wrong, how to filter, rotate and annotate an image, and how to center the crop. The project has a CodeSandbox demo for trying it without a local setup. The component handles the interaction, and the cropped result can be drawn to a canvas or exported as an image, so an app decides what to do with it. The library is a good fit for profile photo uploads, product images and any form that needs the user to choose part of a picture.…
Highlights
- Image cropping with no dependencies
- Touch and keyboard accessible
- Free-form or fixed aspect ratio crops
- Responsive crops in pixels or percentages
- Preview and EXIF rotation guidance
- Demo on CodeSandbox
Ratings & Reviews
No ratings yet
Be the first to rate react-image-crop.
People also visit

react-image-gallery
Responsive image gallery, carousel, image slider react component
react-image-crop FAQ
What does react-image-crop do?
It lets users choose a crop area on an image in the browser, with a React component and no dependencies.
Does it work on touch screens?
Yes. The README lists touch support and responsive sizing.
Can I keep a fixed shape?
Yes. Fixed aspect ratio crops are supported alongside free-form ones.
How do I get the cropped image?
The FAQ covers generating a preview in the browser and drawing the crop to a canvas.
How do I install it?
Install it from npm, or load it from a CDN as described in the README.
Where can I try it?
The README links a CodeSandbox demo.
What are the best react-image-crop alternatives?
Popular alternatives to react-image-crop include react-cropper, react-avatar-editor and react-image-gallery. See all react-image-crop alternatives



















