Skip to content
Beautiful and accessible drag and drop for lists with React
JavaScript
Branch: master
Clone or download
Latest commit 280a848 Nov 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci 12.0 (#1487) Oct 28, 2019
.github/ISSUE_TEMPLATE cleaning urls Nov 6, 2019
.storybook [ImgBot] Optimize images (#1567) Nov 3, 2019
csp-server 12.0 (#1487) Oct 28, 2019
cypress 12.0 (#1487) Oct 28, 2019
docs Fix small typo on docs (#1611) Nov 14, 2019
flow-typed 12.0 (#1487) Oct 28, 2019
src Adding onBeforeCapture Responder (#1605) Nov 14, 2019
stories correct aria-label for lift button (#1606) Nov 14, 2019
test-reports/lighthouse 12.0 (#1487) Oct 28, 2019
test Adding onBeforeCapture Responder (#1605) Nov 14, 2019
.browserlistrc Reduce umd bundle size (#346) Feb 28, 2018
.eslintignore Merging dev to master (it's happening) (#1158) Mar 11, 2019
.eslintrc.js Adding onBeforeCapture Responder (#1605) Nov 14, 2019
.flowconfig 12.0 (#1487) Oct 28, 2019
.gitignore 12.0 (#1487) Oct 28, 2019
.nvmrc 12.0 (#1487) Oct 28, 2019
.prettierignore next (wip) (#823) Nov 11, 2018
.prettierrc Merging dev to master (#607) Jul 3, 2018
.size-snapshot.json Adding onBeforeCapture Responder (#1605) Nov 14, 2019
.stylelintrc.json Merging dev to master (it's happening) (#1158) Mar 11, 2019
CHANGELOG.md Merging dev to master (#607) Jul 3, 2018
CODE_OF_CONDUCT.md Merging dev to master (#607) Jul 3, 2018
CONTRIBUTING.md cleaning urls Nov 6, 2019
LICENSE Merging dev to master (it's happening) (#1158) Mar 11, 2019
README.md adding clearer readme link Nov 8, 2019
a11y-audit-parse.js 12.0 (#1487) Oct 28, 2019
babel.config.js 12.0 (#1487) Oct 28, 2019
browser-test-harness.js 12.0 (#1487) Oct 28, 2019
cypress.json Merging dev to master (it's happening) (#1158) Mar 11, 2019
jest.config.js 12.0 (#1487) Oct 28, 2019
package.json v12.1.1 Nov 15, 2019
rollup.config.js 12.0 (#1487) Oct 28, 2019
server-ports.js 12.0 (#1487) Oct 28, 2019
yarn.lock Improving the accessibility for lift instructions (#1578) Nov 8, 2019

README.md

react beautiful dnd logo

react-beautiful-dnd (rbd)

Beautiful and accessible drag and drop for lists with React

CircleCI branch npm

quote application example

Play with this example if you want!

Core characteristics

  • Beautiful and natural movement of items 💐
  • Accessible: powerful keyboard and screen reader support ♿️
  • Extremely performant 🚀
  • Clean and powerful api which is simple to get started with
  • Plays extremely well with standard browser interactions
  • Unopinionated styling
  • No creation of additional wrapper dom nodes - flexbox and focus management friendly!

Get started 👩‍🏫

We have created a free course on egghead.io 🥚 to help you get started with react-beautiful-dnd as quickly as possible.

course-logo

Currently supported feature set

  • Vertical lists ↕
  • Horizontal lists ↔
  • Movement between lists (▤ ↔ ▤)
  • Virtual list support 👾 - unlocking 10,000 items @ 60fps
  • Combining items
  • Mouse 🐭, keyboard 🎹♿️ and touch 👉📱 (mobile, tablet and so on) support
  • Multi drag support
  • Incredible screen reader support ♿️ - we provide an amazing experience for english screen readers out of the box 📦. We also provide complete customisation control and internationalisation support for those who need it 💖
  • Conditional dragging and conditional dropping
  • Multiple independent lists on the one page
  • Flexible item sizes - the draggable items can have different heights (vertical lists) or widths (horizontal lists)
  • Add and remove items during a drag
  • Compatible with semantic <table> reordering - table pattern
  • Auto scrolling - automatically scroll containers and the window as required during a drag (even with keyboard 🔥)
  • Custom drag handles - you can drag a whole item by just a part of it
  • Able to move the dragging item to another element while dragging (clone, portal) - Reparenting your <Draggable />
  • Create scripted drag and drop experiences 🎮
  • Allows extensions to support for any input type you like 🕹
  • 🌲 Tree support through the @atlaskit/tree package
  • A <Droppable /> list can be a scroll container (without a scrollable parent) or be the child of a scroll container (that also does not have a scrollable parent)
  • Independent nested lists - a list can be a child of another list, but you cannot drag items from the parent list into a child list
  • Server side rendering (SSR) compatible - see resetServerContext()
  • Plays well with nested interactive elements by default

Motivation 🤔

react-beautiful-dnd exists to create beautiful drag and drop for lists that anyone can use - even people who cannot see. For a good overview of the history and motivations of the project you can take a look at these external resources:

Not for everyone ✌️

There are a lot of libraries out there that allow for drag and drop interactions within React. Most notable of these is the amazing react-dnd. It does an incredible job at providing a great set of drag and drop primitives which work especially well with the wildly inconsistent html5 drag and drop feature. react-beautiful-dnd is a higher level abstraction specifically built for lists (vertical, horizontal, movement between lists, nested lists and so on). Within that subset of functionality react-beautiful-dnd offers a powerful, natural and beautiful drag and drop experience. However, it does not provide the breadth of functionality offered by react-dnd. So react-beautiful-dnd might not be for you depending on what your use case is.

Documentation 📖

About 👋

Sensors 🔉

The ways in which somebody can start and control a drag

API 🏋️‍

diagram

Guides 🗺

Patterns 👷‍

Support 👩‍⚕️

Read this in other languages 🌎

Author ✍️

Alex Reardon @alexandereardon

Collaborators 🤝

You can’t perform that action at this time.