Drag and drop terms

The terms UI and UX designers use for the parts of a drag-and-drop interaction. Use them to ensure that everyone is “on the same page” when developing a drag and drop interface, so you get the behaviour you have in mind.

Each demo loops. Hover over or touch one to try it yourself.

Drag handle: only the grip starts a drag

The six-dot grip is the only part of the row that picks it up, so the rest of the row can still be clicked, edited or have its text selected. The dots darken when the pointer reaches them, which tells people they can drag from there.

Give the grip a hit area bigger than the dots, at least 24 by 24 pixels. On a touch screen it also keeps dragging separate from scrolling the page.

Drag preview: the copy that follows the pointer

While you drag, a copy of the card floats under the pointer, lifted with a shadow and tilted a few degrees so it reads as picked up. It stays offset from where you grabbed it instead of jumping to centre on the cursor.

A faded ghost stays in the original spot until you let go, and the column counts change only on the drop.

Drop indicator: a line where the item will land

A thin line with a small ring at its start marks the gap the item will go into. The rows stay still, so nothing jumps around while you aim. The dragged item shrinks to a small chip and its original row fades.

The line disappears when dropping would leave the item where it started. It suits long or dense lists and trees, where shuffling rows about would be distracting.

Drag placeholder: a gap opens where the item will land

Instead of a line, the other rows slide apart to leave a dashed slot the size of the item, so you see the new order before you let go. The dragged row keeps its full width and tilts slightly.

Use a placeholder or a drop indicator, not both. A placeholder suits short lists; an indicator suits long or crowded ones.

Drop zone: an area that accepts dropped files

The zone reacts in stages. As soon as a file is dragged over the page, its border turns solid and the text changes to “Release to upload”. It fills in while the file is held over it. After the drop it shrinks out of the way and the file shows a progress bar, then a tick.

Make the zone clickable too (the “or browse” part), so people who can’t drag can still choose a file.

Autoscroll: the list scrolls when you drag to its edge

Holding a dragged item near the top or bottom of a scrolling list makes the list scroll, so you can reach places that are out of view. The heading stays put and the placeholder travels with the list.

Scrolling starts after a short pause, so brushing past the edge doesn’t set it off, and it goes faster the closer you get to the edge.

Invalid drop target: the drop is refused

When items may only move within their own list, there is more than one way to enforce it. You can refuse the drop, as here, or stop the item leaving its list at all, as in the next example. Here the item can be dragged anywhere, but the other list won’t accept it. No gap opens there, and if you let go the item goes back to where it started.

There are also several ways to show that a list is off limits, and most apps use a few together: a not-allowed cursor, dimming the list, a short “Can’t move here” message, highlighting the list that will accept the item as soon as the drag starts, and animating the item back when it’s dropped in the wrong place. Turn them on and off under the demo to compare. Don’t rely on colour alone, and tell screen reader users when a drop is refused.

Constrained drag: the item can’t leave its list

The other way is to fence the item in. The dragged item stops at the edge of its own list, so there’s nowhere wrong to drop it and no refusal to explain. The pointer can still wander off; the item waits at the edge until it comes back.

The fence can be built in more than one way: keep the item inside the list’s edges, lock it so it only moves up and down, or both. Locking alone isn’t enough here, because the item can still slide above or below the list. Outlining the list while dragging shows where the fence is. Libraries often call this containment, or a “restrict to parent” modifier.

Move buttons: the non-drag alternative

Not drag and drop, but its required partner. WCAG 2.2 success criterion 2.5.7, Dragging Movements (Level AA), says anything you can do by dragging must also be possible with a single pointer and no drag. For a list you can reorder, that usually means up and down buttons on each item. They are also called reorder buttons or move up/down controls.

The first item’s up button and the last item’s down button are disabled. Focus stays on the button as its item moves, so keyboard users can press it again, and a screen reader hears the new position. The handle still works alongside them.

Because move buttons only ever move an item within its own list, they never need the invalid drop target signals above.