@chcodes-hamza/drop-zone

1.0.3 • Public • Published

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.

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>

Readme

Keywords

none

Package Sidebar

Install

npm i @chcodes-hamza/drop-zone

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

26.8 kB

Total Files

3

Last publish

Collaborators

  • chcodes-hamza