1.0.7 • Published 1 year ago

dditems v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

React Reorderable List by Drag and drop.

A simple and customizable React component for creating draggable lists.

Demo: View Demo

Installation

You can install the packagedditems via npm or yarn:

npm install dditems

Code Snipits

import React, { useState } from 'react';
import { DragAndDropList } from 'dditems';

const MyComponent = () => {
  const [items, setItems] = useState([
    { id: '1', content: 'Item 1' },
    { id: '2', content: 'Item 2' },
    { id: '3', content: 'Item 3' }
  ]);

  const handleReorder = (updatedItems) => {
    setItems(updatedItems);
  };

  return (
    <div>
      <h2>My Drag and Drop List</h2>
      <DragAndDropList
        items={items}
        onReorder={handleReorder}
      />
    </div>
  );
};

export default MyComponent;
1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago