karkipy / react-dnd

Home Page:https://karkipy.github.io/dnd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Drag and Drop Library

Install

  yarn add @karkipy/dnd

Usage

function App() {
  const [items, setItems] = React.useState([1, 2, 3, 4, 5]);
  return (
    <div className="container">
      <DragDrop items={items} setItems={setItems} renderItem={(i) => {
        return <div> {i}</div>
      }} />
    </div>
  );
}

About

https://karkipy.github.io/dnd

License:MIT License


Languages

Language:TypeScript 59.4%Language:JavaScript 40.6%