A minimalistic fluid width/responsive image cropper created in Elm.
- Drag to position image in crop area
- Can be initialized (with image/crop size) via ports
- Sends data compatible with
CanvasRenderingContext2D.drawImage() for easy integration in JS apps
- Only bare bones functionality included. (Enables a creative implementation or because MVP)
- External UI for changing zoom as in an
input[type=range] hooked up to model
- Something to process the data to create the cropped image from the original
elm-package install mikaxyz/elm-cropper
The examples should be enough to see how to integrate in your app.
- For integration with JS the full example has basic functionality to create images using a canvas
- The simple example has only the most basic functionality required by Elm Architecture
npm run build
python -m SimpleHTTPServer 8000
# browse examples at http://localhost:8000 and http://localhost:8000/simple.html