dropsource-dnd-core

2.0.1-ds.5 • Public • Published

dnd-core npm package Build Status Test Coverage Join the chat at https://gitter.im/gaearon/dnd-core

Drag and drop sans the GUI.

This is a clean implementation of drag and drop primitives that does not depend on the browser.
It powers React DnD internally.

Wat?

To give you a better idea:

  • There is no DOM here
  • We let you define drop target and drag source logic
  • We let you supply custom underlying implementations (console, DOM via jQuery, React, React Native, whatever)
  • We manage drag source and drop target interaction

This was written to support some rather complicated scenarios that were too hard to implement in React DnD due to its current architecture:

Turns out, these problems are much easier to solve when DOM is thrown out of the window.

What's the API like?

Tests should give you some idea. You register drag sources and drop targets, hook up a backend (you can use barebone TestBackend or implement a fancy real one yourself), and your drag sources and drop targets magically begin to interact.

Dependencies (4)

Dev Dependencies (6)

Package Sidebar

Install

npm i dropsource-dnd-core

Weekly Downloads

6

Version

2.0.1-ds.5

License

MIT

Last publish

Collaborators

  • fertrig