# react-croppa

> Simple react component for cropping images.

Latest version **1.0.4** (published 2022-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-croppa
pnpm add react-croppa
yarn add react-croppa
bun add react-croppa
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-03-14 |
| First published | 2022-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 29 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | solomon@lykdat.com |
| Maintainers | bunmioosha |
| Keywords | cropper, images, crop, cropping, react, typescript |

## Links

- npm: https://www.npmjs.com/package/react-croppa
- Repository: https://github.com/lykdatApps/react-croppa
- Homepage: https://github.com/lykdatApps/react-croppa/#readme
- Issues: https://github.com/lykdatApps/react-croppa/issues
- npm.io page: https://npm.io/package/react-croppa

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-03-14
- 1.0.3 — 2022-03-14
- 1.0.2 — 2022-03-08
- 1.0.1 — 2022-03-04

## README

# react-croppa

Simple React cropper component

## Installation

```
npm i react-croppa
```

## Usage

For image uploads

```ts
<Cropper
    imageUrl={URL.createObjectURL(file)}
    onCropComplete={(output: Blob) => {
        doSomethingWithCroppedImage(output)
    }}
    readyToUse={true | false}
/>
```


`imageUrl`: url for the image that needs to be cropped.

`onCropComplete`: callback function that uses the cropped image.

`readyToUse`: condition that lets the cropper know that the user is done manipulating the image boundaries. When this value changes to `true`, the actual image cropping will happen and the callback function will be executed.

---
_Source: https://npm.io/package/react-croppa · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
