v1.0.0
12 Sep 2026First release.
Added
toBlob(),toFile()andtoDataURL()— the cropped picture itself, at the resolution of the original, which is the part every other cropper leaves to its users.- Output drawn by transforming the whole image under a clip rather than slicing a fractional source rectangle, so there is no one-pixel seam where the crop meets an edge.
- Real circular output through an alpha mask, not a rounded preview over a square file.
maxWidthandmaxHeightthat only ever scale down,width/heightfor an exact size, and a format chosen to keep transparency where the original had it.- Aspect ratios as a number, as
nullfor free, or as a[min, max]range that leaves the selection alone between its ends. - Two modes: a crop dragged over a still picture, and a fixed hole with the picture moving under it — the avatar case, where the image can never pull away from behind the crop.
- Turn by ninety degrees, flip either way, pinch and wheel zoom, and a rule-of-thirds grid.
- Full keyboard control: the crop is a focusable named group, arrows move it, shift resizes it, alt is finer and ctrl is coarser, and every change is read out.
- EXIF orientation applied by the browser rather than by a parser of our own, so a photograph from a phone is the right way up and never rotated twice.
- Drop, paste or choose; the real
<input type="file">stays the control, with the drop zone as its label. - A
ResizeObserverthat lays the widget out the moment it appears, so a cropper built inside a closed modal works;getCrop()saysnullrather than0 × 0until then. minSourceWidth/minSourceHeightto turn away a picture too small for the job, with a message saying how big it needed to be.- A live preview of the output, throttled to a frame.
- React, Vue, Svelte,
<dx-image>and a CDN build over one DOM core. - Theming through CSS variables,
classNameson every part,theme: 'auto', a@layer devixstylesheet, RTL by way of logical properties, and forced-colors support. - 8.2 kB gzip of JavaScript and 1.7 kB of CSS, zero dependencies. The rectangle maths is 2.1 kB on its own, with no DOM in it.