GODRICH
#css-animation#button#loader#transition#scroll#dashboard#ui#design-trends

01Image drop — an instant preview drawn from an object URL the moment it lands

Pulling the File out of the drop event's DataTransfer.files, checking that File.type carries the image/ prefix, and minting a browser-memory-only URL via URL.createObjectURL to feed into img.src renders a preview without any server round-trip -- and revokeObjectURL returns the memory once the preview is dismissed.

Best forProfile photo registration, cover image picking

dropDataTransfer.filesURL.createObjectURL
Image drop — an instant preview drawn from an object URL the moment it lands
Open in a new tab

01 Image drop — an instant preview drawn from an object URL the moment it lands — Measured area 45.397% · moving frames 11/23Original by GODRICH · SCSS and React ship in the zip · Drag and Drop File Upload UI: 9 Computed Dropzones

The post this demo lives in

Drag and Drop File Upload UI: 9 Computed Dropzones - preview of all 9 demosDrag and Drop File Upload UI: 9 Computed DropzonesDropped files turn into previews computed from their bytes: type, size and count drive the layout, images get pixel-read See all demos in this post

If you like this effect - similar demos