React Draggable Array Component
npm install react-draggable-array
Wrapper component utilizing native browser drag API for its children. Happy dragging.
Available as an npm package
``sh`
npm install --save react-draggable-array
`js
import React from 'react'
// Import the component
import DraggableArray from 'react-draggable-array'
// Import the css
import 'react-draggable-array/dist/index.css'
const App = () => {
// Define the array
const items = [ '🦜', '🦖', '🦆', '🦔', '🐤', '🐧' ]
return ( {item}
// Wrap a map of the items in the DraggableArray component
{items.map((item) => (
))}
)
}
``
