UNPKG

ngx-drag-and-drop

Version:

Angular library that allow you to build drag and drop without the native HTML5 API

50 lines (34 loc) 1.02 kB
# ngx drag and drop [![npm version](https://badge.fury.io/js/ngx-drag-and-drop.svg)](https://badge.fury.io/js/ngx-drag-and-drop) Angular library that allow you to build drag and drop without the native HTML5 API. Mobile touches are supported. [Demo](https://jet8a.github.io/ngx-drag-and-drop/) ## Usage Start by importing DragDropModule module ```ts import { NgxDragAndDropModule } from 'ngx-drag-and-drop'; @NgModule({ imports: [ NgxDragAndDropModule ], }) export class ExampleModule { } ``` Add the 'drag-and-drop-wrapper', 'draggable' and 'dropzone' directives ```html <div drag-and-drop-wrapper> <div draggable="card"> Drag me </div> <div dropzone> Drop at me </div> </div> ``` ## How to Contribute 1. [Fork the repo](https://github.com/jet8a/ngx-drag-and-drop/fork) 2. Create a branch in your repo with a descriptive name 3. Code your fix 4. [Create a pull request](https://github.com/jet8a/ngx-drag-and-drop/compare) 5. Await response from the maintainers! ## License MIT