4.0.3 • Published 4 years ago

@ctrl/ngx-droppable v4.0.3

Weekly downloads
102
License
MIT
Repository
github
Last release
4 years ago

ngx-droppable npm CircleCI coverage

Give file dropping super-powers to any element or component

Based on droppable.js

Demo: https://ngx-droppable.vercel.app

Dependencies

Latest version available for each version of Angular

@ctrl/ngx-droppableAngular
current>= 10.x

Install

npm install @ctrl/ngx-droppable

Use

Import and Add to module

import { DroppableModule } from "@ctrl/ngx-droppable";

Add droppable directive to element

<div droppable (filesDropped)="handleFilesDropped($event)"></div>

Inputs

nametypedefaultdescription
isClickablebooleantrueprompt for files when clicked
acceptsMultipleFilesbooleantrueallow multiple files dropped or selected
appendStatusClassesbooleantrueappend CSS class when files are dragged on element
dragOverClassstring'dragover'class added when files are hovered over element
acceptstring \| falsefalselimit accepted file types via MIME see mdn

(Ouput)

nametypedescription
filesDroppedFile[]An array of the files blobs that have been added

License

MIT


GitHub @scttcper  ·  Twitter @scttcper

4.0.3

4 years ago

4.0.2

4 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago