
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@mathewparet/vue-crop-tool
Advanced tools
A tool to easily crop input image. Works like a normal input.
A tool to easily crop input image. Works like a normal input.
# install dependencies
npm install
# build for production with minification
npm run build
import CropperBox from '@mathewparet/vue-crop-tool';
Vue.use(CropperBox);
<div class="form-group row">
<label for="avatar" class="col-md-4 col-form-label text-md-right">Avatar</label>
<div class="col-md-6">
<crop-tool name="avatar" preview="avatar-preview" canvas="avatar-crop-space" v-model="form.avatar">
<span class="form-text text-muted">
Required only if you wish to change current profile picture.
</span>
</crop-tool>
<img src="" id="avatar-crop-space" width="100" />
</div>
</div>
<div>
<div class="avatar-preview rounded-circle" id="profile-pic" style="overflow: hidden; width: 140px; height: 140px; background: url('//via.placeholder.com/140x140/ffffff/?text=Preview')"></div>
</div>
| Name | Description | Required? |
|---|---|---|
| preview | The class name of the <div> element within which the preview will be shown. | Yes |
| canvas | The DOM ID of the <img> element that use used as the crop space | Yes |
<div>.v-model.v-model can't be used to set the initial value.FAQs
A tool to easily crop input image. Works like a normal input.
We found that @mathewparet/vue-crop-tool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.