Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-cropperjs

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-cropperjs

A Vue wrapper component for cropperjs

  • 5.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

vue-cropperjs

A Vue wrapper component for cropperjs.

NPM

Demo

Checkout here agontuk.github.io/vue-cropperjs

Installation

npm install --save vue-cropperjs

or

yarn add vue-cropperjs

You will also need css & style loader for webpack

Compatibility

Vue VersionPackage Version
3.x.x>=5.0.0
2.x.x4.2.0
1.x.x1.0.3

Usage

// Global
import Vue from 'vue';
import VueCropper from 'vue-cropperjs';
import 'cropperjs/dist/cropper.css';
Vue.component(VueCropper);

// Local
import VueCropper from 'vue-cropperjs';
import 'cropperjs/dist/cropper.css';
export default {
  components: { VueCropper}
}

...
<vue-cropper
  ref="cropper"
  :src="imgSrc"
  alt="Source Image"
  @ready="..."
  @cropstart="..."
  @cropmove="..."
  @cropend="..."
  @crop="..."
  @zoom="..."
>
</vue-cropper>
...

this.$refs.cropper.rotate(45);

See the example files & cropperjs documentation

Options

NameTypeRequiredDescription
srcstring--Image source
containerStyleobject--Styling for the image container
imgStyleobject--Styling for the image
altstring--Alternate text for the image

See cropperjs documentation for all posible options & methods.

Renamed Methods

  • relativeZoom from zoom
  • initCrop from crop

License

MIT

Keywords

FAQs

Package last updated on 01 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc