🕊
react-spring-dnd A deadly simple drag and drop solution using react-spring
Play
Install
pnpm add react-spring-dnd
# or
yarn add react-spring-dnd
# or
npm i react-spring-dnd
Usage
import SpringList from 'react-spring-dnd';
const App = () => {
return (
<SpringList>
{'hello react spring dnd 👋⚛️🌀🦥'.split(' ').map((item) => (
<div key={item}>{item}</div>
))}
</SpringList>
);
};
API
Prop | Type | Default | Description |
---|---|---|---|
row |
boolean |
false |
Display as row |
onDragEnd |
function |
- |
onDragEnd callback, (orderList) => void
|
children |
array |
[] |
Draggable items |
License
FUTAKE
Try FUTAKE in WeChat. A mini app for your inspiration moments.