react-spring-dnd

A deadly simple drag and drop solution using react-spring

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-spring-dnd
0.4.0a year ago4 years agoMinified + gzip package size for react-spring-dnd in KB

Readme

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