the elegant image cropper
# npm
npm install @bayinformatics/croppie
# or from git
npm install github:bayinformatics/croppie
import Croppie from '@bayinformatics/croppie'
import '@bayinformatics/croppie/croppie.css'
const cropper = new Croppie(element, {
viewport: { width: 200, height: 200, type: 'circle' },
boundary: { width: 300, height: 300 }
})
// Bind a file directly
await cropper.bindFile(file)
// Get cropped result
const blob = await cropper.result({ type: 'blob' })