1.1.9 • Published 1 year ago

dragdropme v1.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Drag and Drop Package

NPM version Build npm-typescriptLicense]github-license-url

It is simple React drag and drop package.

Live Demo

Installation:

npm install dragdropme --save-dev

or

yarn add -D dragdropme

Usage :

Add DnDMaker to your component:

import React from 'react'
import ReactDOM from 'react-dom/client'
import { DnDMaker } from 'dragdropme'

const rootElement = document.getElementById('root') as HTMLElement;
const root = ReactDOM.createRoot(rootElement);

const Javascript = () => <div>This a react component</div>

const items = {
  'group one' : [{ id: '1', value: <Javascript /> }],
  'group two' : [{ id: '2', value: 'Typescript' }],
  'group three' : [{ id: '3', value: 'ReactJS' }],
  'group four' : [{ id: '4', value: 'NextJS' }],
  'group five' : [{ id: '5', value: 'VueJS' }],
}

const DnDItem = ({ item }) => (<div>{item?.value}</div>);

root.render(
    <React.StrictMode>
        <DnDMaker
          items={items}
          renderItem={<DnDItem />}
          animation={{
            enable: true,
            duration: 200
          }}/>
    </React.StrictMode>,
)
1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.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