# vue-crop

> Crop directive for Vue.js

Latest version **1.0.1** (published 2016-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-crop
pnpm add vue-crop
yarn add vue-crop
bun add vue-crop
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-03-01 |
| First published | 2016-02-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 272 |
| Author | Pantelis Peslis |
| Maintainers | pespantelis |
| Keywords | vue, crop |

## Links

- npm: https://www.npmjs.com/package/vue-crop
- Repository: https://github.com/pespantelis/vue-crop
- Homepage: http://pespantelis.github.io/vue-crop/
- Issues: https://github.com/pespantelis/vue-crop/issues
- npm.io page: https://npm.io/package/vue-crop

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^1.0.0

## Recent versions

- 1.0.1 (latest) — 2016-03-01
- 1.0.0 — 2016-02-29

## README

# VueCrop

> Crop events plugin for Vue.js 1.0

This is a directive for Jcrop 2.0.0.

See a live demo [here](http://pespantelis.github.io/vue-crop/).

## Usage

### Install via npm

Available through npm as `vue-crop`.
```
npm install --save vue-crop
```

### Direct include

You can include it with a `<script>` tag when you have Vue itself included globally. It will automatically install itself, and will add a global `VueCrop`.

## Use in templates

Then you can do this:

``` html
<img src="pic.jpg" width="600" height="400" v-crop:start="cropStart"/>
```
> You should specify both the `height` and `width` attributes

See [Jcrop documentation](http://jcrop.org/doc/events) for all available events.

## Set options

``` js
VueCrop.setOptions({
  setSelect: [10, 10, 100, 100],
  aspectRatio: 1,
  bgColor: 'red'
})
```

See [Jcrop documentation](http://jcrop.org/doc/options) for all available options.

## License

VueCrop is released under the MIT Licence. See the bundled LICENSE file for details.

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