# angular-draggable-droppable

> Drag and drop for angular 20.0+

Latest version **9.0.1** (published 2025-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install angular-draggable-droppable
pnpm add angular-draggable-droppable
yarn add angular-draggable-droppable
bun add angular-draggable-droppable
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 9.0.1 |
| Published | 2025-08-25 |
| First published | 2016-11-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 138.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 134 |
| Author | Matt Lewis |
| Maintainers | mattlewis92 |
| Keywords | angular2, angular, draggable, droppable, drag, drop |

## Links

- npm: https://www.npmjs.com/package/angular-draggable-droppable
- Repository: https://github.com/mattlewis92/angular-draggable-droppable
- Homepage: https://github.com/mattlewis92/angular-draggable-droppable#readme
- Issues: https://github.com/mattlewis92/angular-draggable-droppable/issues
- npm.io page: https://npm.io/package/angular-draggable-droppable

## Dependencies (2)

- [tslib](https://npm.io/package/tslib.md) ^2.4.1
- [@mattlewis92/dom-autoscroller](https://npm.io/package/@mattlewis92/dom-autoscroller.md) ^2.4.2

## Recent versions

- 9.0.1 (latest) — 2025-08-25
- 6.0.0-beta.0 (next) — 2021-12-11
- 4.3.6-alpha.0 (alpha) — 2019-10-09
- 4.4.0-beta.1 (beta) — 2019-04-21
- 9.0.0 — 2025-08-23
- 8.0.0 — 2022-12-11
- 7.0.0 — 2022-08-02
- 6.1.0 — 2022-04-19
- 6.0.1 — 2022-04-12
- 6.0.0 — 2021-12-11
- 5.0.0 — 2021-08-30
- 5.0.0-alpha.0 — 2021-08-30
- 4.6.0 — 2020-12-28
- 4.5.6 — 2020-10-22
- 4.5.5 — 2020-10-20
- … 92 more at https://npm.io/package/angular-draggable-droppable/versions

## README

# angular 20.0+ drag and drop

[![Sponsorship](https://img.shields.io/badge/funding-github-%23EA4AAA)](https://github.com/users/mattlewis92/sponsorship)
[![Build Status](https://github.com/mattlewis92/angular-draggable-droppable/actions/workflows/ci.yml/badge.svg)](https://github.com/mattlewis92/angular-draggable-droppable/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/mattlewis92/angular-draggable-droppable/branch/main/graph/badge.svg)](https://codecov.io/gh/mattlewis92/angular-draggable-droppable)
[![npm version](https://badge.fury.io/js/angular-draggable-droppable.svg)](http://badge.fury.io/js/angular-draggable-droppable)
[![Twitter Follow](https://img.shields.io/twitter/follow/mattlewis92_.svg)](https://twitter.com/mattlewis92_)

## Demo

https://mattlewis92.github.io/angular-draggable-droppable/

## Table of contents

- [About](#about)
- [Installation](#installation)
- [Documentation](#documentation)
- [Development](#development)
- [License](#licence)

## About

Observable powered drag and drop for angular 20.0+

## Installation

Install through npm:

```
npm install angular-draggable-droppable
```

Then use it in your app like so:

```typescript
import { Component, NgModule } from '@angular/core';
import { DraggableDirective, DroppableDirective } from 'angular-draggable-droppable';

@Component({
  selector: 'demo-app',
  imports: [DraggableDirective, DroppableDirective],
  template: `
    <div mwlDraggable (dragEnd)="dragEnd($event)">Drag me!</div>
    <div mwlDroppable (drop)="this.droppedData = $event.dropData">
      <span [hidden]="droppedData">Drop here</span>
      <span [hidden]="!droppedData">Item dropped here with data: "{{ droppedData }}"!</span>
    </div>
  `,
})
class DemoApp {
  droppedData: string;

  dragEnd(event) {
    console.log('Element was dragged', event);
  }
}
```

Note: if draggable elements are inside a scrollable element then you will need to add `mwlDraggableScrollContainer` as an attribute to the scrollable container.

You may also find it useful to view the [demo source](https://github.com/mattlewis92/angular-draggable-droppable/tree/main/src/demo).

## Documentation

All documentation is auto-generated from the source and can be viewed here:
https://mattlewis92.github.io/angular-draggable-droppable/docs/

## Alternatives

I wrote this library because I needed drag and drop whilst snapping to a grid. If you don't need this feature then I recommend checking out one of these other awesome drag and drop libraries:

- [Angular CDK drag and drop](https://material.angular.io/cdk/drag-drop/overview)
- [angular-skyhook](https://github.com/cormacrelf/angular-skyhook)
- [ng-drag-drop](https://github.com/ObaidUrRehman/ng-drag-drop)

## Development

### Prepare your environment

- Install [Node.js (>=24.5.0)](http://nodejs.org/)
- Install pnpm: `corepack enable`
- Install local dev dependencies: `pnpm install` while current directory is this repo

### Development server

Run `pnpm start` to start a development server on port 8000 with auto reload + tests.

### Testing

Run `pnpm test` to run tests once or `pnpm test:watch` to continually run tests.

### Release

```bash
pnpm release
```

## License

MIT

---
_Source: https://npm.io/package/angular-draggable-droppable · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
