Both zones have child elements inside. Drag a file (or any content) over each. Left zone flickers on child elements. Right uses a counter — highlight stays solid.
Drop here
Child elements cause flicker
Drop here or browse
Counter tracks enter/leave nesting
⚠ The HTML Drag and Drop API uses mouse events. Touchscreen input (phones, tablets) does NOT trigger drag events. The <input type="file"> click trigger is the primary interface for mobile users — not a fallback. Always provide it.
Drop multiple files. Validates file count (max 5), allowed types (images only), and individual size (max 2MB). All errors shown in the announcement area.
Drop up to 5 images
PNG, JPG, WebP, or GIF · Max 2MB each · Up to 5 files
Select a file to simulate an upload with a real progress bar. Uses XMLHttpRequest.upload.onprogress — the Fetch API has no equivalent. Uses the semantic <progress> element.
Select a file
Simulates upload with real XHR progress events
The same Drag and Drop API handles UI element reordering. Drag items up or down. The cursor position relative to each item's midpoint determines insert-before or insert-after.
⚠ WCAG 2.5.7 (Dragging Movements, Level AA): a production reorder list needs a keyboard alternative — typically Space to grab, ↑/↓ to move, Enter/Esc to commit/cancel — plus aria-live announcements after each move. This demo shows the drag mechanic only.
Drag the items below. Each uses a different custom ghost and dropEffect. The cursor icon changes based on dropEffect (copy, move, link).
Drop here — see the ghost and cursor change