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

fg-file-grab

v0.0.3

Published

Lightweight Angular file dropzone component with icons for PDF, XLS/XLSX/CSV and images; drag & drop, click-to-select, and removal.

Readme

file-grab

Lightweight Angular dropzone component with built‑in file‑type badges (PDF, XLS/XLSX/CSV, Images). Supports drag & drop, click‑to‑select, multiple files, remove, and open in new tab.

Installation

npm i fg-file-grab
# or scoped
# npm i @your-scope/file-grab

Peer dependencies: Angular ^18, @angular/common, @angular/core.

Usage

Import the standalone component and place the selector in your template.

import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FileGrabComponent } from 'fg-file-grab';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [CommonModule, FileGrabComponent],
  template: `
    <file-grab
      [uploadHereLabel]="'Drop your file or click here'"
      [uploadDescLabel]="'Accepts jpg, jpeg, png, pdf, xls, xlsx, csv'"
      [accept]="'image/jpg,image/jpeg,image/png,application/pdf,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv,.xls,.xlsx,.csv,.pdf,.jpg,.jpeg,.png'"
      [multiple]="true"
      (fileSelected)="onFileSelected($event)"
      (filesChanged)="onFilesChanged($event)">
    </file-grab>
  `
})
export class AppComponent {
  onFileSelected(file: File) {
    // Handle a single file (e.g., upload to storage)
  }
  onFilesChanged(files: File[]) {
    // Handle the current list of selected files
  }
}

Inputs

  • uploadHereLabel?: string – Main dropzone label.
  • uploadDescLabel?: string – Secondary helper text.
  • accept?: string – CSV of MIME types and/or extensions. If omitted, defaults to jpg, jpeg, png, pdf, xls, xlsx, csv.
  • multiple: boolean – Allow multiple file selection (default: false).

Outputs

  • fileSelected: EventEmitter<File> – Fires for each added file.
  • filesChanged: EventEmitter<File[]> – Fires with the full list when it changes (add/remove).

Supported Types (by default)

  • Images: image/jpg, image/jpeg, image/png, or .jpg, .jpeg, .png
  • PDF: application/pdf or .pdf
  • Spreadsheets: application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, text/csv or .xls, .xlsx, .csv

Styling

The component ships with minimal CSS for a modern look (dashed border, badges). You can override styles by targeting the classes:

  • .fg-dropzone, .fg-over, .fg-icon-pdf, .fg-icon-xls, .fg-icon-generic, .fg-remove, etc.

Development

Run the demo app in this workspace to develop locally.

npx ng serve demo-app

Build the library (Ivy partial mode):

npx ng build file-grab --configuration production

Publish (no GitHub required)

# bump version in projects/file-grab/package.json
npx ng build file-grab --configuration production
npm publish ./dist/file-grab --access public

Verify:

npm view file-grab version

License

MIT