react-beautiful-dnd README

The project's README from github.com/atlassian/react-beautiful-dnd. As one markdown file: README.md.

🔒 Archived

This project is now archived and is deprecated on npm. If you are still using react-beautiful-dnd, we have put together some resources to help you move forward. To see our ongoing work in the drag and drop problem space, head to Pragmatic drag and drop.

We are so grateful to everybody who contributed in big and small ways to this project.

Cheers



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

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 ✅

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 🌎

Creator ✍️

Alex Reardon @alexandereardon

Alex is no longer personally maintaining this project. The other wonderful maintainers are carrying this project forward.

Maintainers

Collaborators 🤝

react-beautiful-dnd (atlassian/react-beautiful-dnd)

Searching Database…

33.9K ·GitHub
archived
这是什么?一个 React 库,用于为列表构建美观且支持无障碍访问的拖放交互,支持垂直和水平列表、列表之间的移动以及嵌套列表。
这是一个通用的拖放工具包,还是更专门的东西?它是专为列表打造的更高层抽象,而不是像 react-dnd 那样的通用拖放底层原语库。
我该如何把它加入项目?将其作为 npm/yarn 依赖安装,然后用 DragDropContext、Droppable 和 Draggable 组件包裹应用中需要拖放功能的部分;另外还有一门免费的 egghead.io 课程可以入门。
它底层依赖什么?它基于 React 构建,内部依赖 css-box-model、memoize-one、redux 和 react-redux 等配套包。
我现在把它用在新项目上还安全吗?不安全——该项目已在 npm 上归档并标记为弃用;团队建议后续开发改用 Pragmatic drag and drop。
这是为谁开发的?为需要可重新排序列表的 React 应用前端开发者而做,包括需要良好屏幕阅读器和键盘无障碍支持的用户。
它支持哪些拖动输入方式?开箱即支持鼠标、键盘和触摸输入,包括键盘拖动时的自动滚动。
它能处理非常大的列表吗?可以,它支持虚拟列表,能以 60fps 流畅渲染 10,000 项。
它支持同时拖动多个项目吗?支持,多项拖动是其功能集的一部分,还包括合并项目以及有条件的拖放。
为什么我不直接改用 react-dnd?react-dnd 提供更广泛的底层拖放原语,而 react-beautiful-dnd 则牺牲了这份广度,换来更精致、自然且支持无障碍访问的体验,专门针对列表重排序进行了优化。
Creator
atlassian
Size
14.5 MB
Stars
33.9K
Age
9y
Commits · 90 Days