# react-magic-dropzone

> Magically drag and drop files/links, built for React

Latest version **1.0.1** (published 2017-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-magic-dropzone
pnpm add react-magic-dropzone
yarn add react-magic-dropzone
bun add react-magic-dropzone
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-11-08 |
| First published | 2017-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Nick Bourdakos |
| Maintainers | bourdakos1 |
| Keywords | react-component, react, drag, drop, upload |

## Links

- npm: https://www.npmjs.com/package/react-magic-dropzone
- Repository: https://github.com/bourdakos1/react-magic-dropzone
- Issues: https://github.com/bourdakos1/react-magic-dropzone/issues
- npm.io page: https://npm.io/package/react-magic-dropzone

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-11-08
- 1.0.0 — 2017-11-08
- 0.0.3 — 2017-11-03
- 0.0.2 — 2017-11-02
- 0.0.1 — 2017-11-01

## README

# ✨Magic Dropzone [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Drag-and-drop%20files%20or%20urls!%20Built%20for%20React:&url=https://github.com/bourdakos1/react-magic-dropzone&hashtags=react,component,dropzone,developers)

[![Build Status](https://travis-ci.org/bourdakos1/react-magic-dropzone.svg?branch=master)](https://travis-ci.org/bourdakos1/react-magic-dropzone)
[![codecov](https://codecov.io/gh/bourdakos1/react-magic-dropzone/branch/master/graph/badge.svg)](https://codecov.io/gh/bourdakos1/react-magic-dropzone)
[![license](https://img.shields.io/github/license/bourdakos1/react-magic-dropzone.svg)](https://github.com/bourdakos1/react-magic-dropzone/blob/master/LICENSE)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![npm-version](https://img.shields.io/npm/v/react-magic-dropzone.svg)](https://www.npmjs.com/package/react-magic-dropzone)
[![npm-downloads](https://img.shields.io/npm/dm/react-magic-dropzone.svg)](https://www.npmjs.com/package/react-magic-dropzone)

<div align="center">
  <a href="https://codesandbox.io/embed/y200pqy4pz?view=preview"><img src="/screenshots/demo.gif" alt="demo.gif"></a>
  <div><i>Try out the <a href="https://codesandbox.io/embed/y200pqy4pz?view=preview">demo</a></i></div>
</div>

## Installation

```bash
yarn add react-magic-dropzone
```
or:
```bash
npm install --save react-magic-dropzone
```

## Usage

Import `MagicDropzone` in your React component:

```javascript static
import MagicDropzone from 'react-magic-dropzone'
```

```jsx
onDrop = (accepted, rejected, links) => {
  // Have fun
}
```

```jsx
<MagicDropzone
  accept="image/jpeg, image/png, .jpg, .jpeg, .png"
  onDrop={this.onDrop}
>
  Drop some files on me!
</MagicDropzone>
```

[![Edit y200pqy4pz](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/y200pqy4pz)

## License

MIT

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