Skip to main content
InteractionLevel 3

Drag & Drop

拖拽排序

WebMobileDesktopDifficulty: Advanced

Press something, drag it to another position, and release — and it moves there.

01

Live Demo

Actually clickable

To do

Design the home page
Write the docs

In progress

Build search

Done

Set up the project
Lock the colour palette
Drag a card with the mouse. On touchscreens you have to handle more gesture conflicts — one of the hardest interactions.

What you just saw:Dragging a card to another column on a Kanban board, moving a sticky note in Trello, repositioning a layer in a design tool, reordering a todo list by dragging.

02

What it actually is

Drag and drop lets users manipulate two abstract things directly: order and membership. It must ship a non-drag alternative, because dragging demands fine motor control and not everyone knows items can be dragged.

drag and dropdrag to reorderdnddraggablereorderdrop target
03

Anatomy · What it's made of

  1. Drag Handle拖拽把手

    Shows the grab cursor on hover

  2. Ghost拖影

    Semi-transparent copy following the pointer

  3. Drop Target放置区

    Highlights to show the insertion point

  4. Placeholder占位

    Leaves a gap at the original position

  5. Keyboard Alt键盘替代

    Arrow keys to move once picked up

04

When to Use

When it fits, and when it doesn't
Drag & Drop usage recommendations
SituationUse it?
Changing order or membership (boards, layers, rankings)Yes
Spatial position itself carries meaningYes
A keyboard equivalent such as "Move to…" is providedYes
The ordering is purely cosmetic (users do not care about order)No
You are just picking one option (a click is enough)No

Drag and drop carries a high accessibility cost: you must support both the keyboard (Space to pick up, arrow keys to move, Space to drop) and a "Move to…" menu.

Dragging on mobile has to handle auto-scroll and gesture conflicts, which makes it one of the hardest interactions to get right.

05

Similar Patterns

Don't mix these up
06

How to tell AI

Three levels of prompt

Add the component name and specifics

Support drag-and-drop reordering: while dragging, leave a gap at the origin and show an insertion indicator line; on release, animate the item smoothly into its new position and update the underlying array order.

07

Don't just say this to AI

Bad → Better

Don't say this to AI

Support dragging to change the order.

Say this instead

Implement drag-and-drop reordering: only enter the dragging state past a 5px movement threshold so clicks still work, make the source element semi-transparent and show an insertion line at the target, settle the remaining items with a FLIP animation on drop, and add the keyboard path (Space to pick up, Up/Down to move, Space to drop, Esc to cancel).

08

Share this card

Social-ready

Turn this pattern into a 3:4 or 1:1 knowledge card and export it as PNG right in the browser. No backend needed.