implementing-drag-drop

Implements drag-and-drop and sortable React interfaces using dnd-kit with accessibility support.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/masermediagroup-stack/maser-media --skill implementing-drag-drop-masermediagroup-stack
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: implementing-drag-drop
Source: https://github.com/masermediagroup-stack/maser-media/tree/main/.cursor/skills/community/ai-design-components/skills/implementing-drag-drop
Command: npx skills add https://github.com/masermediagroup-stack/maser-media --skill implementing-drag-drop-masermediagroup-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @dnd-kit/core, @dnd-kit/sortable, @dnd-kit/utilities, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Building drag-and-drop interfaces in React involves complex decisions around library selection, keyboard accessibility, touch support, and performance for large lists. This Skill provides structured patterns, reference implementations, and validation scripts to implement sortable lists, kanban boards, file dropzones, and reorderable grids correctly. ## Core Features & Use Cases - Pattern Library: Reference implementations for sortable lists, kanban boards, file upload dropzones, and 2D grid reordering using dnd-kit. - Accessibility-First Guidance: Keyboard navigation, screen reader announcements via aria-live regions, and alternative UI controls (move buttons) for non-drag interaction. - Utility Scripts & Types: Scripts for drop position calculation and accessibility validation, plus TypeScript type definitions and a JSON configuration schema for dnd-kit. - Use Case: When building a Trello-style kanban board, use this Skill to set up DndContext with multi-container dragging, DragOverlay, WIP limits, and full keyboard/screen reader support. ## Quick Start Ask the AI to implement an accessible sortable list or kanban board in your React project using dnd-kit with keyboard navigation and screen reader announcements.

Frequently Asked Questions about implementing-drag-drop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement drag and drop in React with dnd-kit?▼

Install @dnd-kit/core, @dnd-kit/sortable, and @dnd-kit/utilities, then wrap your list in DndContext with PointerSensor and KeyboardSensor. Use useSortable for each item and handle reordering in onDragEnd with arrayMove.

What React library should I use for drag and drop?▼

dnd-kit is recommended for modern React projects because it has built-in accessibility, touch and keyboard support, zero dependencies at roughly 10KB, and native TypeScript. It is the suggested migration target from react-beautiful-dnd.

How do I make drag and drop keyboard accessible?▼

Add KeyboardSensor with sortableKeyboardCoordinates so users can grab items with Space or Enter, move with arrow keys, and drop with Space. Also provide aria-live announcements and alternative move buttons for non-drag interaction.

Does dnd-kit support touch devices and mobile dragging?▼

Yes, dnd-kit supports touch input. Use a long press of 250-300ms to initiate drag, prevent scrolling during the drag operation, keep touch targets at least 44px, and test on real devices to resolve gesture conflicts.

How do I handle drag and drop performance with large lists?▼

For lists over 100 items, implement virtual scrolling and throttle drag events. Use CSS transforms instead of position properties, apply will-change for animations, and memoize components with useMemo and useCallback.

How do I build a file upload dropzone with progress indicators?▼

Use a dropzone pattern with accept rules for MIME types, maxSize and maxFiles validation, and visual states for drag-active, accept, and reject. Track upload progress per file with XMLHttpRequest progress events and display progress bars.