Skip to content

scoped-elements/dropzone

Repository files navigation

@scoped-elements/dropzone

Re-export of the Dropzone.js package in a custom element to be used with @open-wc/scoped-elements.

Installation

npm i @scoped-elements/dropzone

Usage

As an sub element in your own custom element

import { DropzoneElement } from '@scoped-elements/dropzone';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';

export class CustomElement extends ScopedElementsMixin(LitElement) {
  static get scopedElements() {
    return {
      'drop-zone': DropzoneElement,
    };
  }

  render() {
    return html` <drop-zone url="https://my-upload-url.com"></drop-zone> `;
  }
}

As a globally defined custom element

import { DropzoneElement } from '@scoped-elements/material-web';

customElements.define('drop-zone', DropzoneElement);

Documentation for the elements

As this package is just a re-export, you can find the documentation for Dropzone.js here: https://www.dropzone.dev/js/.

About

Scoped Elements exporting Dropzone.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors