Direct manipulation
Drag to reposition, scroll or pinch to zoom, rotate, flip, and constrain the image inside the crop.
A small, touch-friendly cropper for profile photos, uploads, previews, and simple image workflows.
The live preview mounts the Vue 3 component from this repository. Choose an image, drag and zoom it inside the fixed viewport, rotate or flip it, and export the visible pixels.
Vue Croppa exposes movement, zoom, rotation, output, metadata, and direct canvas methods through a component ref.
<script setup>
import { ref } from 'vue'
import { Croppa } from 'vue-croppa'
import 'vue-croppa/style.css'
const cropper = ref(null)
async function save() {
const blob = await cropper.value?.promisedBlob('image/jpeg', 0.9)
// Upload or download blob here.
}
</script>
<template>
<Croppa ref="cropper" :width="400" :height="300" prevent-white-space />
<button @click="save">Save crop</button>
</template>Versions: Vue 3 uses the v2 guide. Vue 2 applications can keep vue-croppa@1 and use the v1 guide, v1 examples, and migration guide.