3.3.1 • Published 9 months ago

@elizabeth011685/vue3-dropzone v3.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

About the Project

the features of this package include the following:

  • Highly customizable
  • Lightweight, powerful and easy to use <g-emoji class="g-emoji" alias="smile"
  • Provides with image preview, multiple state like error success and disable, etc...

Installation

  • Install Yarn package
yarn add @jaxtheprime/vue3-dropzone
  • Install NPM package
npm install @jaxtheprime/vue3-dropzone

Usage

Local registration:

<template>
    <Vue3Dropzone v-model="files"/>
</template>

<script>
    import Vue3Dropzone from "@jaxtheprime/vue3-dropzone";
    import '@jaxtheprime/vue3-dropzone/dist/style.css'

    const files = ref([])
    };
</script>

Props

PropTypeDefaultNote
modelValueArray[]2 way binding ref
multipleBooleanfalseMakes dropzone accept multiple files
previewsArray[]Preview images links (works with mode props)
modestringdropDefines dropzone functionality to accept drops or just preview images
disabledBooleanfalseDisables the whole dropzone
acceptStringundefinedAccepted type of files
maxFileSizeNumber5Max file size in Megabytes
maxFilesNumber5Max files accepted by dropzone
widthNumber StringundefinedDropzone container width
heightNumber StringundefinedDropzone container height
imgWidthNumber StringundefinedPreview images width
imgHeightNumber StringundefinedPreview images height
previewWrapperClassesStringundefinedPreview images container classes
showSelectButtonBooleantrueSelect files button in the dropzone
selectFileStrategyString'replace'Defines selecting file strategy (replace, merge)

Events

PropData TypeNote
errorArrayEmits the error event and also provides data to know which files caused the error

Slots

Namedata
buttonfileInput
previewdata
descriptionundefined
placeholder-imgundefined
titleundefined

Css variables

NameValue
--v3-dropzone--primary94, 112, 210
--v3-dropzone--border214, 216, 220
--v3-dropzone--description190, 191, 195
--v3-dropzone--overlay40, 44, 53
--v3-dropzone--overlay-opacity0.3
--v3-dropzone--error255, 76, 81
--v3-dropzone--success36, 179, 100

Contact

Emad Moghimi jaxtheprime@gmail.com

Project Link: https://github.com/JaxThePrime/vue3-dropzone

3.3.1

9 months ago

3.3.0

9 months ago