1.0.3 • Published 1 year ago

@chcodes-hamza/drop-zone v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Drop Zone Custom element

GitHub package.json version (branch) npm

it 's a custom element that enables drop zone to manage file. A reusable web component.

npm.io

Usage

With npm

Install the package using npm or yarn

npm i @chcodes-hamza/drop-zone
# or
yarn add @chcodes-hamza/drop-zone

Then import it in your script

import '@chcodes-hamza/drop-zone'

With unpkg.com

<script type="module" src="https://unpkg.com/@chcodes-hamza/drop-zone"></script>

Then use the custom element in your html using is="drop-zone.

<form action="where-ever-you-want" method="post" enctype="multipart/form-data">
    <input type="file" multiple name="files[]" label="Drop files here."
           help="this is a help text" is="drop-zone" />
    <p>
        <button type="submit">Submit</button>
    </p>
</form>