Gathering detailed insights and metrics for @jaxtheprime/vue3-dropzone
Gathering detailed insights and metrics for @jaxtheprime/vue3-dropzone
Gathering detailed insights and metrics for @jaxtheprime/vue3-dropzone
Gathering detailed insights and metrics for @jaxtheprime/vue3-dropzone
npm install @jaxtheprime/vue3-dropzone
Typescript
Module System
Node Version
NPM Version
56.2
Supply Chain
98
Quality
89.7
Maintenance
100
Vulnerability
100
License
Vue (96.02%)
JavaScript (2.72%)
HTML (1.26%)
Total Downloads
12,294
Last Day
14
Last Week
406
Last Month
1,404
Last Year
10,968
22 Stars
95 Commits
9 Forks
3 Watchers
1 Branches
3 Contributors
Updated on Jun 10, 2025
Minified
Minified + Gzipped
Latest Version
3.3.8
Package Id
@jaxtheprime/vue3-dropzone@3.3.8
Unpacked Size
58.25 kB
Size
14.89 kB
File Count
6
NPM Version
11.4.1
Node Version
23.5.0
Published on
Jun 02, 2025
Cumulative downloads
Total Downloads
Last Day
-22.2%
14
Compared to previous day
Last Week
33.1%
406
Compared to previous week
Last Month
-4.2%
1,404
Compared to previous month
Last Year
727.1%
10,968
Compared to previous year
A flexible Vue 3 dropzone component with unified preview and edit capabilities. Perfect for file uploads, image galleries, and product management interfaces. Demo
Prop | Type | Default | Description |
---|---|---|---|
modelValue | Array | [] | Array of File objects representing newly selected files. Two-way binding with v-model. |
previews | Array | [] | Array of URL strings for existing files/images. Two-way binding with v-model:previews. |
mode | String | "drop" | Component behavior mode: "drop" (new files only), "preview" (display only), "edit" (combined functionality). |
multiple | Boolean | false | Allow selection of multiple files simultaneously. |
disabled | Boolean | false | Completely disable all interactions with the dropzone. |
Prop | Type | Default | Description |
---|---|---|---|
selectFileStrategy | String | "replace" | How new files interact with existing ones: "replace" (clear existing), "merge" (add to existing). |
allowSelectOnPreview | Boolean | false | Allow file selection in preview mode. When true, clicking on empty areas in the preview container triggers file selection, while clicks on images and preview items are prevented to avoid accidental selection. When false, preview mode is read-only. |
maxFiles | Number | 5 | Maximum number of files that can be selected at once. |
maxFileSize | Number | 5 | Maximum file size allowed in megabytes (MB). |
accept | String | undefined | Comma-separated list of allowed file types (MIME types). Example: "image/*,application/pdf". |
Prop | Type | Default | Description |
---|---|---|---|
width | Number/String | auto | Width of the dropzone container. Can be px, %, or any CSS unit. |
height | Number/String | 200px | Height of the dropzone container. Can be px, %, or any CSS unit. |
previewPosition | String | "inside" | Where to display file previews: "inside" (within dropzone), "outside" (below dropzone). |
imgWidth | Number/String | auto | Width of individual preview images. |
imgHeight | Number/String | auto | Height of individual preview images. |
previewWrapperClasses | String | "" | Additional CSS classes to apply to the preview container. |
Prop | Type | Default | Description |
---|---|---|---|
showSelectButton | Boolean | true | Display the "Select File" button within the dropzone interface. |
fileInputId | String | auto-generated | Custom ID for the hidden file input element. Auto-generated if not provided. |
state | String | "indeterminate" | Visual state of the dropzone: "indeterminate" , "success" , "error" . Affects border colors. |
Prop | Type | Default | Description |
---|---|---|---|
serverSide | Boolean | false | Enable server-side file upload functionality with progress tracking. |
uploadEndpoint | String | undefined | URL endpoint for file uploads when serverSide is enabled. |
deleteEndpoint | String | undefined | URL endpoint for file deletion when serverSide is enabled. |
headers | Object | {} | Additional HTTP headers to send with server requests. |
Event | Payload | Description |
---|---|---|
update:modelValue | Array | Emitted when the files array changes. Contains File objects. |
update:previews | Array | Emitted when the previews array changes. Contains URL strings. |
drop | Event | Emitted when files are dropped onto the dropzone. |
fileUploaded | Object | Emitted when a file successfully uploads (server-side mode). |
fileRemoved | Object | Emitted when a File object is removed from the list. |
previewRemoved | Object | Emitted when a preview URL is removed from the list. |
error | Object | Emitted on validation errors or upload failures. Contains error type and files. |
The component uses CSS custom properties for easy theming:
Variable | Default | Purpose |
---|---|---|
--v3-dropzone--primary | 94, 112, 210 | Primary color (RGB values) |
--v3-dropzone--border | 214, 216, 220 | Border color (RGB values) |
--v3-dropzone--description | 190, 191, 195 | Description text color (RGB values) |
--v3-dropzone--error | 255, 76, 81 | Error state color (RGB values) |
--v3-dropzone--success | 36, 179, 100 | Success state color (RGB values) |
--v3-dropzone--overlay | 40, 44, 53 | Overlay background color (RGB values) |
--v3-dropzone--overlay-opacity | 0.3 | Overlay opacity value |
Override default content with custom implementations:
Slot | Purpose |
---|---|
placeholder-img | Replace the default placeholder image |
title | Replace the default "Drop your files here" title |
button | Replace the default "Select File" button |
description | Replace the default file requirements description |
preview | Custom preview item rendering |
Access these methods via template ref:
Method | Parameters | Description |
---|---|---|
clearFiles() | None | Remove all File objects (new uploads) |
clearPreviews() | None | Remove all preview URLs (existing files) |
clearAll() | None | Remove both files and previews completely |
clearPreview() | None | Legacy method - equivalent to clearAll() |
Perfect for e-commerce platforms where users need to manage product images - showing existing images while allowing additions, removals, and replacements.
Ideal for user profile interfaces where you display current profile pictures and allow users to upload new ones.
Great for document upload interfaces where users can see existing documents and add new ones.
Excellent for photo gallery management where users can view existing images and upload additional ones.
Perfect for CMS interfaces where content creators need to manage media files alongside text content.
Ideal for administrative interfaces across various platforms where administrators need to manage user-uploaded content, system assets, or shared media libraries. Works well for social platforms, educational systems, corporate portals, and any application requiring centralized media administration.
This component provides a complete solution for file management interfaces with the flexibility to adapt to various use cases and design requirements.
No vulnerabilities found.
No security vulnerabilities found.