Drag and drop

From thedaviddias/ux-patterns-for-developers · View interactive version

Drag and drop is an AI agent skill from the GitHub repository thedaviddias/ux-patterns-for-developers. Use when implementing allow users to reorder items intuitively.

How to use this skill

Skill file

Drag and Drop

Allow users to reorder items intuitively

What it solves

A Drag and Drop pattern helps teams create a reliable way to let users move or reorder items spatially while preserving clear feedback, keyboard alternatives, and safe recovery. It is most useful when teams need sortable lists and priorities.

Compared with adjacent patterns, this pattern should reduce friction without hiding the state, rules, or recovery paths people need to keep moving.

When to use

When to avoid

Implementation workflow

  1. Confirm the pattern matches the problem and constraints before copying the example.
  2. Start from the anatomy and examples in references/pattern.md, then choose the smallest viable variation.
  3. Apply accessibility, performance, and interaction guardrails before layering visual polish.
  4. Use the testing guidance to verify behavior across keyboard, screen reader, responsive, and failure scenarios.

Accessibility guardrails

Keyboard Interaction

Screen Reader Support

Visual Accessibility

Performance guardrails

Common mistakes

**Designing only the happy path**

The Problem:

The pattern feels polished until loading, empty, and failure states appear.

How to Fix It?

Specify the full lifecycle alongside the default state so implementation does not improvise later.

**Letting interaction and content drift apart**

The Problem:

Users work harder when controls, status, and supporting information feel disconnected.

How to Fix It?

Keep the information architecture of the pattern close to the interaction model.

**Treating accessibility as a final pass**

The Problem:

Keyboard, announcement, and reading-order issues become expensive once the interaction is already fixed.

How to Fix It?

Bake semantics, focus behavior, and announcements into the first implementation.

Related patterns


For full implementation detail, examples, and testing notes, see references/pattern.md.

Pattern page: https://uxpatterns.dev/patterns/content-management/drag-and-drop

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.