Create now β« π kee.so
A deadly simple drag and drop solution using react-spring
pnpm add react-spring-dnd
# or
yarn add react-spring-dnd
# or
npm i react-spring-dnd
import SpringList from 'react-spring-dnd';
const App = () => {
return (
<SpringList>
{'hello react spring dnd πβοΈππ¦₯'.split(' ').map((item) => (
<div key={item}>{item}</div>
))}
</SpringList>
);
};
Prop | Type | Default | Description |
---|---|---|---|
row |
boolean |
false |
Display as row |
onDragEnd |
function |
- | onDragEnd callback, (orderList) => void |
children |
array |
[] |
Draggable items |