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

@kit-ng-ui/upload

v0.1.0

Published

Kit UI Upload — file picker, drag-and-drop area, and file list with progress.

Readme

@kit-ng-ui/upload

File picker + drag-and-drop area + file list. Purely client-side — the consumer wires the transport (HttpClient, presigned PUT, GraphQL mutation, …).

Install

pnpm add @kit-ng-ui/upload
@use '@kit-ng-ui/upload/styles' as upload;

Usage

<kit-upload [(files)]="files" (filesAdded)="upload($event)">
  <kit-button>Choose file</kit-button>
</kit-upload>

<kit-upload drag [(files)]="files">
  <p>Drag files here</p>
</kit-upload>

<kit-upload listType="picture-card" [(files)]="files">
  <kit-button>+</kit-button>
</kit-upload>

Update each file's status / progress / url as your transport reports back:

async upload(added: ReadonlyArray<KitUploadFile>) {
  for (const f of added) {
    this.patch(f.uid, { status: 'uploading', progress: 0 });
    await this.transport.put(f.raw!, (p) => this.patch(f.uid, { progress: p }));
    this.patch(f.uid, { status: 'done', url: '/cdn/' + f.name });
  }
}

API

| Input | Type | Default | | -------------- | --------------------------------------------------- | --------- | | files | ReadonlyArray<KitUploadFile> (two-way) | [] | | multiple | boolean | false | | accept | string \| null | null | | disabled | boolean | false | | drag | boolean | false | | showList | boolean | true | | listType | 'text' \| 'picture' \| 'picture-card' | 'text' | | beforeUpload | ((file: File) => boolean \| Promise<boolean>) \| null | null |

| Output | Payload | | -------------- | ------------------------------------ | | filesAdded | ReadonlyArray<KitUploadFile> | | filesRemoved | KitUploadFile |

The component exposes open() for programmatic file-picker invocation when the trigger isn't a labelled input.

Security

This component does no upload-time validation beyond invoking beforeUpload. Treat the picker like any other untrusted user input:

  • Always re-validate on the server. accept and beforeUpload are client-side hints; a determined caller can bypass both by talking to your transport directly. The server must verify file type (by content sniff, not by extension), enforce size limits, and scan for malware.
  • Don't trust file.name for filesystem paths. Sanitise on the server before persisting. Display-only usage inside the component is safe (Angular escapes interpolations).
  • Revoke blob URLs. If you set file.url to a URL.createObjectURL(blob) for previews, call URL.revokeObjectURL when removing the file or destroying the parent component — otherwise the blob lingers in memory.
  • Strip Authorization headers from logs. When wiring your transport, ensure request/response logging redacts auth tokens.
  • CSRF. Same-origin uploads should send your CSRF token / use SameSite cookies; cross-origin uploads should rely on CORS + the server's allowlist.