vue-cropper-next

Cropperjs as Vue3 component
962
Install
npm install vue-cropper-next
Latest Version:0.0.1-beta4
Vue:3
License:MIT
Last Updated:Mar 11, 2023
Links: npm
Maintainer: marsorsun

vue-cropper

Cropperjs as Vue3 component

Docs

Installation

Install via pnpm

pnpm install vue-cropper-next

Quick Example

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>

Related Packages

@ballcat/vue-cropper

vue image cropper by cropperjs

30,945
vue-cropper

A simple Vue picture clipping plugin

1,973,748 4,553
vue-cropper-small-custom

����vuecropper 0.4.8�޸�

1,058 4,553
@xcvzmoon/vue-cropperjs

Vue component wrapper for CropperJS

876 2
vue-cropper-image

a vue component wrapper for cropperjs

1,978 5

Version History

Pre-releases (4)
Version Released Vue License
0.0.1-beta4 ^3.2.45 MIT
0.0.1-beta3 ^3.2.45 MIT
0.0.1-beta2 ^3.2.45 MIT
0.0.1-beta1 ^3.2.45 MIT