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

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: 4 months ago
JSON representation

🖼️ 6 Dropzone for Nuxt.js 3 applications.

Awesome Lists containing this project

README

          



6 Dropzone support for Nuxt 3



[![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/devbox/jgrd5q)

---

#### 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/devbox/jgrd5q)

## 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. |
| `accept` | `String/String[]` | `" "` | Defines the types of files that are allowed. You can pass a single string (e.g., 'image/*') or an array of strings (e.g., ['image/png', 'image/jpeg']). |
| `multiple` | `Boolean` | `false` | Allows uploading multiple files if set to true. |

### 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. |
| `addFile` | | |
| `clearFile` | | |

### Slots

| Name | Description |
|-----------|-----------------------|
| `Default` | The default Vue slot. |
| `Icon` | change or close icons |

## ⚖️ 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