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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@miasta/vue-file-tray

v0.0.8

Published

Miasta Vue.js UI – component to process, interact with and upload files

Downloads

21

Readme

vue-file-tray

Part of the M2 UI suite.

Component to process, upload and interact with files.

This component is used to process files. Most common use case is of course uploading files to server, but file-tray does not do any uploading on it's own. Instead, it stores the files data in accessible files property, so you can process them however you like.

Front end users can add files to file-tray by dropping them over it, or using standard browser dialog.

file-tray can take care of validation, will generate data for thumbnails, or for crunched version of images. How to further upload or process the files is up to the you.

file-tray is a single element component – it's just a plain <div> – this means that you can style it whatever you like. it also has a default slot, so you can have content in it. This makes file-tray a very flexible component. Remember to add some styling when you render it, otherwise it will not be visible.


props

| property | type | default | comment | | --------------- | ------- | ------------- | ---------------------------------------- | | maxFileSize | Number | 10 | Max file size in MB. | | maxFiles | Number | 10 | Max number of files you can add. | | accepted | Array | ['image/*'] | Accepted mime types. | | dragAdd | Boolean | true | Allow for adding files by drag and drop. | | clickAdd | Boolean | true | Open file dialog on click | | thumbs | Boolean | true | Should genereate thumbnails | | thumbSizes | Array | [300,300] | [width, height] in px | | processImages | Boolean | false | Should generate processed images | | maxEdge | Number | 1200 | Processed images largest dimenssion (px) | | quality | Number | 0.92 | JPEG processing quality 0-1 |


data

| property | comment | | -------- | ---------------------------------------- | | files | Array of files in the file-tray. Also contains thumb Blob, thumb url, processed Blob and processed url. | | over | Boolean – whether files are dragged over. |


methods

| method | args | comment | | -------------- | ---- | ----------------- | | openFinder() | — | Open file dialog. |


events

| name | payload | comment | | ------------------- | ------- | ------------------------------- | | error:accepted | ✔ | Rejected mime type. | | error:maxFileSize | ✔ | File too large. | | error:maxFiles | ✔ | Too many files. | | file:added | ✔ | File added. Payload is file ID. | | files:changed | ✖ | Any changes to files property |