# imagedropjs

> Small, simple drag&drop image uploader for your website

Latest version **1.0.8** (published 2021-09-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install imagedropjs
pnpm add imagedropjs
yarn add imagedropjs
bun add imagedropjs
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2021-09-13 |
| First published | 2021-09-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yolosopher |
| Maintainers | yolosopher |

## Links

- npm: https://www.npmjs.com/package/imagedropjs
- Repository: https://github.com/Yolosopher/ImageDropJS
- Homepage: https://github.com/Yolosopher/ImageDropJS#readme
- Issues: https://github.com/Yolosopher/ImageDropJS/issues
- npm.io page: https://npm.io/package/imagedropjs

## Recent versions

- 1.0.8 (latest) — 2021-09-13
- 1.0.7 — 2021-09-13
- 1.0.6 — 2021-09-13
- 1.0.5 — 2021-09-13
- 1.0.1 — 2021-09-12
- 1.0.0 — 2021-09-12

## README

# imagedrop


## Usage:

* Link imagedrop.css before every other styles inside your ```<head>``` tags

```
<head>
    <link rel="stylesheet" href="imagedrop.css" />
    <link rel="stylesheet" href="style.css" />
</head>
```

* Make an empty element(div is recommended) and give it a class

```
    <div class="your_div_classname"></div>
```

* Link imgdrop.js right before the end of the ```<body>``` tag.

```
    <body>
        <!-- other stuff  -->

        <script src="./path/imagedrop.js"></script>
    </body>
```

* Make a script tag after imgdrop.js

### Inside script tags you have to define new ImageDrop like this

```
    <body>
        <!-- other stuff  -->

        <script src="./path/imagedrop.js"></script>
        <script>
            new ImageDrop("your_div_classname").init()
        </script>
    </body>
```

## Options:

### Options must be an object type and all of its values must be string types.

### You can pass the options like this(these are the default values):

```
<script>
    let options = {
        inputName: 'images', // Necessary
        textContent: 'Drag or Drop Images Here',
        borderColor: 'grey',
        borderWidth: '1px',
        borderRadius: '12px',
        fontSize: '30px',
        fontFamily: 'san-serif',
    }
    new ImageDrop("your_div_classname", options).init()
</script>
```

---
_Source: https://npm.io/package/imagedropjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
