# vue-cropper-next

> [Cropperjs](https://github.com/fengyuanchen/cropperjs) as Vue3 component

Latest version **0.0.1-beta4** (published 2023-03-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-cropper-next
pnpm add vue-cropper-next
yarn add vue-cropper-next
bun add vue-cropper-next
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1-beta4 |
| Published | 2023-03-11 |
| First published | 2023-03-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | marsorsun |
| Keywords | vue, vue-component, cropper, image, cropperjs, vue-cropper, vue-cropperjs, v-cropper |

## Links

- npm: https://www.npmjs.com/package/vue-cropper-next
- npm.io page: https://npm.io/package/vue-cropper-next

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^3.2.45
- [cropperjs](https://npm.io/package/cropperjs.md) ^1.5.13
- [vue-cropper-next](https://npm.io/package/vue-cropper-next.md) 0.0.1-beta4

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.0.1-beta4 (latest) — 2023-03-11
- 0.0.1-beta3 — 2023-03-11
- 0.0.1-beta2 — 2023-03-11
- 0.0.1-beta1 — 2023-03-11

## README

# vue-cropper

[Cropperjs](https://github.com/fengyuanchen/cropperjs) as Vue3 component

## Docs

- [Cropperjs](https://github.com/fengyuanchen/cropperjs)

## Installation

Install via pnpm

```
pnpm install vue-cropper-next
```

## Quick Example

```typescript
import { VueCropper } from '../dist/vue-cropper.js';
import 'cropperjs/dist/cropper.css';
import { ref } from "vue";

const containerStyle = {
  display: 'block',
  'max-width': '80vw',
  height: '60vh'
}

const container = ref();

const curOptions: Cropper.Options = {
  viewMode: 1,
  scalable: false,
  zoomOnWheel: false,
  zoomable: false,
  rotatable: false,
  ready: () => {
    console.log('ready');
    const cropper = container.value.cropper;
    console.log(cropper.getCroppedCanvas().toDataURL());
  }
}

<template>
  <VueCropper :style="containerStyle" src="https://raw.githubusercontent.com/roadmanfong/react-cropper/master/example/img/child.jpg" :options="curOptions" ref="container" />
</template>

<style scoped></style>
```

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