Skip to content

Customize - Drop Effects

A drag source can advertise a drop effect through DropEffect, which sets the native dataTransfer.effectAllowed. Drag the two boxes below and watch the cursor: the copy box shows a “+” badge, the move box does not.

Copy me (effect = copy)
Move me (effect = move)
Drop here
The browser only offers the effects a source allows. With DropEffect="copyMove" the user can switch to copying by holding Ctrl (⌥ on macOS) during the drag; the boxes above allow a single effect each, so modifier keys do not change them.
An unhandled error has occurred. Reload 🗙