react-drag-list-component

1.0.11 • Public • Published

react-drag-list-component

Simple drag list component

Install

$ npm i react-drag-list-component

OR

$ yarn add react-drag-list-component

Example

render() {
  return (
    <DragList 
      list={[]}
      update={(item, old, next) => {}}
      render={(item, index) => <div key={index}>{item.name}</div>}
    />
  );
}

Drag list Props

Prop Name Description Required Default
list List of elements to render true ---
placeholder To show placeholder draged elements false true
update Callback function after change position of element true ---
render Callback function to render element from list true ---
handler To show handler to draged element false true

Cli-commands

Start tests:

$ yarn test

Our blogs

See Meanstack.eu - voil See Meandjs - ddosdor

License

MIT

Ready to Rock&Roll, Hell Yeah!

Package Sidebar

Install

npm i react-drag-list-component

Weekly Downloads

12

Version

1.0.11

License

MIT

Unpacked Size

39.2 kB

Total Files

26

Last publish

Collaborators

  • voilvoil