Web UI - Drag and Drop
Web UI - Drag and Drop
Drag and Drop has become a more familiar idiom on the Web.
Drag and drop seems simple. Just grab an object and drop it
somewhere. What makes it challenging is that there are a lot
of events during drag and drop that can be used as
opportunities for feedback to the user.
There are a number of individual states at which interaction is
possible. We call these microstates interesting moments. Eg:
• How will users know what is draggable?
• What does it mean to drag and drop an object?
• Where can you drop an object, and where is it not valid to drop
an object?
• What visual affordance will be used to indicate draggability?
EVENTS
There are at least 15 events available for cueing the user during a drag and
drop interaction.
• Page Load: Before any interaction occurs, you can pre-signify the
availability of drag and drop.
• Mouse Hover: The mouse pointer hovers over an object that is draggable.
• Mouse Down: The user holds down the mouse button on the draggable
object.
• Drag Initiated: After the mouse drag starts (usually 3 pixels).
• Drag Leaves Original Location: After the drag object is pulled from its
location or object that contains it.
• Drag Re-Enters Original Location: When the object re-enters the original
location.
• Drag Enters Valid Target: Dragging over a valid drop target.
• Drag Enters Specific Invalid Target: Dragging over an invalid drop target.
EVENTS
Invitation to drag
Moving the mouse to a
module’s header changes
the cursor to indicate that
the item is draggable.
Dragging
The module being moved
is dragged directly. A
ripped-out “hole” is
exposed where the
module was dragged from.
Approaches for drop
Placeholder target
Insertion target
Placeholder Target
• Dragging
Rearranging occurs in real
time. An empty slot is
exposed where the dragged
item will fit.
• Dropped
The item snaps into the new
location (where the hole
was opened up).
Drag Lens
• Invitation to drag
When the mouse hovers
over a member of the
organization, the cursor
changes to show
draggability.
Drag and Drop Object
• Dragging
An insertion bar is used to
indicate where the
member will be inserted
when dropped.
• Dropped
When the dragged member
is dropped, the chart is
rearranged to
accommodate the new
location.
Best Practices for Drag and Drop Object
• Invitation to drag
Hovering over any part of the
route provides a draggable circle
(route point) with a tool tip
saying “Drag to change route”.
Drag and Drop Action
• Dragging
We want to stay on the east side
of the bay and cross the San
Mateo bridge. Dragging the route
bubble back over the bridge will
reroute our trip.
• Dropped
The route changes as we drag.
Dropping completes the rerouting
action.
Best Practices for Drag and Drop Action
Use Drag and Drop Actions sparingly in web interfaces, as they
are not as discoverable or expected.
Provide alternate ways to accomplish the action. Use the Drag
and Drop Action as a shortcut mechanism.
Don’t use drag and drop for setting simple attributes. Instead
use a more direct approach to setting attributes on the object.
Don’t construct an artificial visual representation for the sole
purpose of implementing drag and drop. Drag and drop
should follow the natural representation of the objects in the
interface.
Provide clear invitations on hover to indicate the associated
action.
Drag and Drop Collection
• Dragging
The item gets a dragging
treatment.
• Dropped
The cart is populated with
the new item.
Best Practices for Drag and Drop Collection
Use as an alternate way to collect items (e.g., a shopping
cart).
When a drag gets initiated, highlight the valid drop area to
hint where drop is available.
Provide alternate cues that drag and drop into collections as
available.
General Best Practices for Drag and Drop
Keep page jitter to a minimum while dragging objects.
Initiate dragging if the user presses the mouse down and
moves the mouse three pixels, or if she holds the mouse
down for at least half a second.
Use drag and drop for performing direct actions as an
alternate method to more direct mechanisms in the interface.
Hint at the availability of drag and drop when using
alternatives to drag and drop.
Pay attention to all of the interesting moments during drag
and drop. Remember, you must keep the user informed
throughout the process.
Use Invitations to cue the user that drag and drop is available.