Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 2.09 KB

README.md

File metadata and controls

62 lines (44 loc) · 2.09 KB

kee.so

Create now ➫ 🔗 kee.so


react-spring-dnd 🕊

A deadly simple drag and drop solution using react-spring

npm npm npm bundle size npm peer dependency version GitHub


Play

Edit react-spring-dnd

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

MIT License © nanxiaobei