React Dragon Drag and Drop

React drag and drop library with a dragon

Note: this project is based on the poorly-supported drag and drop web API

install with npm

npm i react-dragon-drag-and-drop

Quickstart

Single list

With dragons:


<Dragbox> 
  <ul>
      <Draggable dragon={true}>
          <li>Thing 1</li>
      </Draggable> 
      
      <Draggable dragon={true}> 
          <li>Thing 2</li> 
      </Draggable> 
  </ul>
</Dragbox>

Without dragons:

dragon is false by default

Drag between two lists


<Dragbox>
  <ul>
    <Draggable>
        <li>Box 1 thing 1</li>
    </Draggable>

    <Draggable>
        <li>Box 1 thing 2</li>
    </Draggable>
  </ul>   
</Dragbox>

<Dragbox>
    <ul>
      <Draggable>
          <li>Box 2 thing 1</li>
      </Draggable>

      <Draggable>
          <li>Box 2 thing 2</li>
      </Draggable>
    </ul>
</Dragbox>