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

jb-file-input

v3.0.0

Published

file input web component

Readme

jb file input

Published on webcomponents.org GitHub license NPM Version GitHub Created At

File upload web component. this component just let user select file and wait for you to get the value and handle it yourself and it's not handling any kind of upload or something

Samples

Using with JS frameworks

to use this component in react see jb-file-input/react;

using with JS frameworks

Usage

just import package with import or from js CDN and write web component tag in your html

<script>
  import 'jb-file-input'
</script>

<jb-file-input></jb-file-input>

Placeholder Title

you can change file input place holder text by set placeholder-title="select your special file" attribute in dom

Value

jb-file-input use file as default value type. means you can get value by dom.value and set it by dom.value= yourFile.

Reset Value

you can reset input file value by dom.value = null or dom.resetValue()

Loading State

jb-file-input dont show any loading by default because it's just a file input and not file uploader. but you can show upload state in file uploader by set some attribute and property.

in HTML

<jb-file-input uploading>

or in javascript:

// show upload section 
document.querySelector("jb-file-input").setAttribute("uploading","")
// set upload percent
document.querySelector("jb-file-input").uploadPercent = 10; //10% of file uploaded

Download Button

when file upload is complete user access to download button and you can add your own function to download file by add event listener:

document.querySelector("jb-file-input").addEventListener("download",()=>{
  //download file however you want
})

download button has no default functionality because file download in every project has it's own way so we just create a ui button to enable you ad function for it.

Hide Download Button

if you dont want download button to be shown add hide-download attribute to dom:

<jb-file-input hide-download></jb-file-input>

Other Related Docs: