Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/4sllan/six-dropzone

🖼️ 6 Dropzone for Nuxt.js 3 applications.
https://github.com/4sllan/six-dropzone

dropzone module nuxt nuxt-dropzone nuxt-module nuxt3 six-dropzone

Last synced: 3 months ago
JSON representation

🖼️ 6 Dropzone for Nuxt.js 3 applications.

Awesome Lists containing this project

README

        



6 Dropzone support for Nuxt 3



[![Static Badge](https://img.shields.io/badge/NPM:six-dropzone?style=flat-square&colorA=18181B&colorB=28CF8D)](https://www.npmjs.com/package/six-dropzone)
[![Static Badge](https://img.shields.io/badge/GITHUB:six-dropzone?style=flat-square&colorA=18181B&colorB=28CF8D)](https://github.com/4sllan/six-dropzone)
[![npm version](https://img.shields.io/npm/v/six-dropzone/latest.svg?style=flat-square&colorA=18181B&colorB=28CF8D)](https://www.npmjs.com/package/six-dropzone)
![GitHub License][license]
[![npm downloads](https://img.shields.io/npm/dt/six-dropzone.svg?style=flat-square&colorA=18181B&colorB=28CF8D)](https://www.npmjs.com/package/six-dropzone)
[![Nuxt][nuxt-src]][nuxt-href]
[![Static Badge](https://img.shields.io/badge/-%E2%99%A5%20Sponsors-ec5cc6?style=flat-square)](https://github.com/sponsors/4sllan)

[Demo online](https://codesandbox.io/p/sandbox/six-dropzone-forked-mtmwt7)

---

#### Table of Content

- [Features](#features)
- [Demo](#demo)
- [Installation](#installation)
- [Usage](#usage)
- [API](#api)
* [Props](#props)
* [Events](#events)
* [Slots](#slots)

## Features

## Demo

[![view six-dropzone](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/six-dropzone-forked-mtmwt7)

## Setup

## Installation

> six-dropzone for Nuxt3 applications.

```sh
npx nuxi@latest module add six-dropzone
```

### Config

***nuxt.config.js***

``` js
{
modules: [
'six-dropzone',
]
},

```

## Usage

```html

const photo = ref()
const drop = (e) => {
console.log(e.dataTransfer.files[0], 'drop')
}
const selectedFile = (e) => {
console.log(e, 'change')
};
const modelValue = (e) => {
console.log(e, 'model-value')
}

```

## API

### Props

| Name | Type | Default Value | Description |
|------------------|-------------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `dropMounted` | `String` | `undefined` | The image URL. |
| `label` | `String` | `Select File` | Sets the button text |
| `error-messages` | `String/String[]` | `[]` | Puts the input in an error state and passes through custom error messages. Will be combined with any validations that occur from the rules prop. This field will not trigger validation. |

### Events

| Name | Type | Description |
|---------------------|-----------|-----------------------------------------------------------|
| `drop` | `[File]` | drop value of the component. |
| `change` | `[File]` | value of the component. |
| `update:modelValue` | `[File]` | Event that is emitted when the component’s model changes. |

### Slots

| Name | Description |
|-----------|-----------------------|
| `Default` | The default Vue slot. |

## ⚖️ License

Released under [MIT](/LICENSE) by [@4slan](https://github.com/4sllan).

[license]: https://img.shields.io/github/license/4sllan/six-dropzone?style=flat-square&colorA=18181B&colorB=28CF8D

[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js

[nuxt-href]: https://nuxt.com