@antdv-next/img-crop

Image cropper integrated with antdv-next Upload. Wrap an Upload component, crop in a modal, get the cropped file in beforeUpload.
1,843
Install
npm install @antdv-next/img-crop
Latest Version:0.0.2
Vue:3
License:MIT
Last Updated:Jul 29, 2026
Links: npm
Maintainer: aibayanyu

@antdv-next/img-crop

Image cropper for antdv-next Upload component.

Wraps @antdv-next/vue-easy-crop into an antdv-next <Upload> component. Select an image → crop it in a modal → get the cropped file in beforeUpload.

✨ Features

  • 🔌 Drop-in — Just wrap your <Upload> with <ImgCrop>
  • 🪟 Modal crop UI — Built-in controls for zoom, rotation, and aspect ratio
  • 🎚️ Configurable sliders — Toggle zoom, rotation, and aspect sliders
  • 🔲 Rect / Round crop shapes
  • 🪝 beforeCrop hook — Validate files before cropping
  • 📐 Custom aspect ratio — Set initial ratio or let users adjust

📦 Installation

pnpm add @antdv-next/img-crop antdv-next

🚀 Quick Start

<script setup>
import { ImgCrop } from '@antdv-next/img-crop'
import { Upload, Button } from 'antdv-next'

function handleUpload(file) {
  // file is already cropped!
  console.log(file)
  return false // prevent actual upload in demo
}
</script>

<template>
  <ImgCrop :aspect="1" crop-shape="rect">
    <Upload :before-upload="handleUpload">
      <Button>Upload &amp; Crop</Button>
    </Upload>
  </ImgCrop>
</template>

📖 API

See the docs site or run locally:

pnpm --filter docs dev

📄 License

MIT

Related Packages

vue-core-image-upload

a vue plgin for image upload and crop

70,167 1,340
vuejs-clipper

Vue.js image clipping components using Vue-Rx.

137,085 205
@dixipro/magic-image

A Vue 3 picture editor in one component: file or clipboard in, original and crop...

0 4
vue-image-chooser

Simple Image Uploader for Vue

2,052 6

Version History

Version Released Vue License
0.0.2 >=3.0.0 MIT
0.0.1 >=3.0.0 MIT