react-beautiful-dnd: Drag and drop for React lists
Accessible React library for list drag-and-drop interactions.
Learn more about React Beautiful DnD
react-beautiful-dnd is a React component library that provides drag and drop functionality for list-based interfaces. It uses a sensor-based architecture to handle mouse, keyboard, and touch input, with a declarative API built around Draggable and Droppable components. The library implements accessibility features including keyboard navigation and screen reader announcements without requiring additional DOM wrapper nodes. Common use cases include reordering lists, moving items between lists, and implementing sortable interfaces in web applications.
Zero-Wrapper DOM Structure
Implements drag and drop without injecting extra DOM elements that break layouts. Preserves flexbox and CSS grid compatibility while maintaining native focus management and accessibility tree structure.
Built-in Accessibility Support
Includes keyboard navigation and screen reader announcements out of the box with customizable internationalization. Handles ARIA attributes and focus management automatically without additional configuration.
Virtual List Compatibility
Integrates with virtualized list libraries like react-window for performant drag-and-drop in lists with thousands of items. Maintains smooth 60fps interactions even when only visible items are rendered to the DOM.
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
function TaskList({ tasks }) {
const handleDragEnd = (result) => {
if (!result.destination) return;
const items = Array.from(tasks);
const [reordered] = items.splice(result.source.index, 1);
items.splice(result.destination.index, 0, reordered);
};
return (
<DragDropContext onDragEnd={handleDragEnd}>
<Droppable droppableId="tasks">
{(provided) => (
<ul {...provided.droppableProps} ref={provided.innerRef}>
{tasks.map((task, index) => (
<Draggable key={task.id} draggableId={task.id} index={index}>
{(provided) => (
<li ref={provided.innerRef} {...provided.draggableProps} {...provided.dragHandleProps}>
{task.content}
</li>
)}
</Draggable>
))}
{provided.placeholder}
</ul>
)}
</Droppable>
</DragDropContext>
);
}Adds React v18 support via peerDependency with documentation improvements.
- –Adds react v18 to the list of supported react versions via peerDependency
- –Various dependency bumps
- –Various changes to documentation
Adds individual sensor imports and React 17 support with improved event handling.
- –You can now import default sensors as `useMouseSensor`, `useKeyboardSensor`, or `useTouchSensor` for individual reuse via `sensors` prop
- –React 17 is now supported
- –Removed redundant event listener
Major release fixing polyfilling issues and improving screen reader accessibility.
- –Babel changes: no more unintentional polyfilling!
- –More reliable on focus messaging. Verified on VoiceOver, JAWS and NVDA screen readers
- –DragDropContext | liftInstruction
- –DragDropContext | dragHandleUsageInstructions
- –DragHandleProps | aria-labelledby
Top in Frontend
Related Repositories
Discover similar tools and frameworks used by developers
tradingview
Custom datafeed integration for Tradingview charting library.
Tailwind CSS Typography
Cascading typographic styles for unstyled HTML containers.
Chakra UI
Themeable React components with built-in accessibility and Emotion styling.
Telegram Web A
Official Telegram web client built with minimal dependencies and custom MTProto implementation.
TanStack Query
Declarative server-state caching with automatic background synchronization.