draggable-element is a simple JavaScript library that enables drag-and-drop functionality for HTML elements. It is lightweight and easy to integrate into any web project.
- Lightweight and dependency-free
- Easy to use and integrate
- Supports touch and mouse events
- Customizable drag behavior
You can install draggable-element via npm:
npm install draggable-elementOr include it directly in your HTML file:
<script src="path/to/draggable-element.js"></script>
## Usage
To make an element draggable, simply add the `draggable` class to the element:
```html
<div class="draggable">Drag me!</div>
Initialize the draggable functionality in your JavaScript:
import Draggable from 'draggable-element';
const draggable = new Draggable('.draggable');For any questions or support, please contact me at rmageshkumar.it@gmail.com.
This project is licensed under the MIT License.