react-spring-dnd
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

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

FUTAKE

Try FUTAKE in WeChat. A mini app for your inspiration moments. 🌈

FUTAKE

Package Sidebar

Install

npm i react-spring-dnd

Weekly Downloads

1,020

Version

0.4.0

License

MIT

Unpacked Size

13.1 kB

Total Files

6

Last publish

Collaborators

  • nanxiaobei