README
react-spring-dnd 🕊
A deadly simple drag and drop solution using react-spring
Add
yarn add react-spring-dnd
# or
npm i react-spring-dnd
Use
import SpringList from 'react-spring-dnd';
const App = () => (
<SpringList>
{'hello react spring dnd 👋⚛️🌀🦥'.split(' ').map((item) => (
<div key={item}>{item}</div>
))}
</SpringList>
);
Try
API
Prop | Type | Default | Description |
---|---|---|---|
row |
boolean |
false |
If show as row |
onDragEnd |
function |
- | onDragEnd callback, (order) => void |
children |
array |
[] |
Draggable items |