@chcodes-hamza/drop-zone
v1.0.3
Published
it 's a custom element that enables drop zone to manage file. reusable web component.
Downloads
5
Readme
Drop Zone Custom element
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>