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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue3-simple-file-input

v1.0.3

Published

A Simple File Input with Vue 3

Downloads

82

Readme

vue3-simple-file-input

Simple file input made for Vue.js, just install and add a v-model to the component. This accept a variety of files types. Be confidente to ask more file inputs at twitter to @darkjeda

Installation

As usual, just use

npm i vue3-simple-file-input

Usage

In any .vue component file just add the import for the component, by example

import FileInput from 'vue3-simple-file-input'

and add it in your components section as:

components {
  FileInput
}

This component needs a v-model to work as a return variable. So in your template HTML section use it as:

<file-input v-model="YourModel">

This returns an object with 4 inner variables:

response = {
  file: <- This is the file itself
  fileName: <- The file name
  fileBlob: <- The file blob in case you need to add it into a FormData and send it in a HTTP Request,
  fileType: <- The file type
}

In case the window file selection is closed, this may return NULL

Optional

This component plugin accept 6 general file types and other few more options, so if you want to use one, use it like:

Excel files
<file-input v-model="YourModel" is-excel>

Word files
<file-input v-model="YourModel" is-word>

Image files
<file-input v-model="YourModel" is-image>

Video files
<file-input v-model="YourModel" is-video>

PDF files
<file-input v-model="YourModel" is-pdf>

Audio files
<file-input v-model="YourModel" is-audio>

Change background color to the button
<file-input v-model="YourModel" button-background-color="#YouColorHere">

Change text color to the button
<file-input v-model="YourModel" button-text-color="#YouColorHere">

Change the placeholder input text
<file-input v-model="YourModel" placeholder-input-text="Your Placeholder Here">

Change the placeholder button text
<file-input v-model="YourModel" placeholder-button-text="Your Placeholder Here">

And of course, you can leave it without a file type, it will accept any file type.

License

MIT