Note: unlike React-DND, however, this is based on the poorly-supported drag and drop API
Install with NPM
npm i react-dragon-drag-and-drop
Note: because draggable items can insert themselves before or after each other, you do not need Dragbox for just one list
or this should be true, but testing reveals dragging works better in a Dragbox
<Dragbox>
<ul>
<Draggable>
<li>Thing 1</li>
</Draggable>
<Draggable>
<li>Thing 2</li>
</Draggable>
</ul>
</Dragbox>
<>
<Dragbox>
<ul style={{backgroundColor: "lightcoral", minHeight: "5rem", minWidth: "5rem"}}>
<Draggable>
<li>Box 1 thing 1</li>
</Draggable>
<Draggable>
<li>Box 1 thing 2</li>
</Draggable>
</ul>
</Dragbox>
<Dragbox>
<ul style={{backgroundColor: "lightcyan", minHeight: "5rem", minWidth: "5rem"}}>
<Draggable>
<li>Box 2 thing 1</li>
</Draggable>
<Draggable>
<li>Box 2 thing 2</li>
</Draggable>
</ul>
</Dragbox>
</>
- Dragimage customization
- Also dragon image customization
- Ability to drag onto anywhere on the screen
- Keep track of history and use ctrl-Z to undo the effects of a drag
- Drag over customizable effects
- Dragging is weird with grid
- But this might be a good time to use React-DND
- If someone knows how to use Storybook properly, please
- There's probably something to add I just can't think of it
- Seconding the sentiment of Dragbox