npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-document-uploader-lab-5

v1.3.0

Published

A Vue 3 component for file uploads with drag & drop and document preview

Readme

Document Uploader Component Features

  • Drag & Drop Support - Intuitive file upload via drag & drop
  • File Selection - Click to browse and select files
  • Preview Support - Preview uploaded files using URL.createObjectURL
  • Document Templates - Display predefined documents with custom icons
  • Delete Functionality - Remove uploaded or predefined documents
  • Max Files Limit - Enforce maximum number of files
  • Beautiful UI - Modern and responsive design
  • TypeScript Support - Full TypeScript definitions included

Installation

npm install @your-org/vue-document-uploader

Usage

Global Registration (Plugin)

import { createApp } from 'vue'
import App from './App.vue'
import DocumentUploaderPlugin from '@your-org/vue-document-uploader'

const app = createApp(App)
app.use(DocumentUploaderPlugin)
app.mount('#app')

Component Usage

<script setup lang="ts">
import { ref } from 'vue'

const uploadedFiles = ref<File[]>([])
const availableDocuments = ref([
  { type: 'pdf', icon: '/icons/pdf.svg', name: 'Contract.pdf' },
  { type: 'docx', icon: '/icons/docx.svg', name: 'Report.docx' },
  { type: 'xlsx', icon: '/icons/xlsx.svg', name: 'Data.xlsx' }
])
</script>

<template>
  <DocumentUploader
    v-model="uploadedFiles"
    v-model:documents="availableDocuments"
    :maxFiles="5"
  />
</template>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | modelValue | Array<File> | [] | Array of uploaded files (v-model) | | documents | Array<Document> | [] | Predefined documents to display | | maxFiles | number | 10 | Maximum number of files allowed |

Document Interface

interface Document {
  type: string    // File type identifier (e.g., 'pdf', 'docx')
  icon: string    // URL or data URI for icon
  name: string   // Display name
}

Events

| Event | Type | Description | |-------|------|-------------| | update:modelValue | Array<File> | Emitted when files are added or removed | | update:documents | Array<Document> | Emitted when documents are removed |

Examples

Basic Upload

<template>
  <DocumentUploader v-model="files" :maxFiles="5" />
</template>

<script setup>
import { ref } from 'vue'

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

With Predefined Documents

<template>
  <DocumentUploader
    v-model="files"
    v-model:documents="documents"
    :maxFiles="10"
  />
</template>

<script setup>
import { ref } from 'vue'

const files = ref([])
const documents = ref([
  { type: 'pdf', icon: 'data:image/...', name: 'Template.pdf' }
])
</script>

Styling

The component includes default styles but can be customized using CSS variables or scoped styles.

CSS Variables

.document-uploader {
  --upload-zone-border-color: #ccc;
  --upload-zone-hover-color: #42b883;
  --document-preview-bg: white;
  --delete-btn-color: rgba(255, 0, 0, 0.8);
}