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

@ligrila/background-remover

v0.3.8

Published

![Screenshot of the component in action](https://github.com/Ligrila/background-remover/blob/main/src/assets/screenshot.webp?raw=true)

Readme

Ligrila Background Remover

Screenshot of the component in action

This is a web component that allows users to remove the background from images directly in the browser. It uses the briaai/RMBG-1.4 model from Hugging Face for image processing and is built with Lit.

Features

  • In-browser background removal: No need to upload images to a server.
  • Drag-and-drop support: Easy-to-use interface for selecting images.
  • Zoom and compare: Tools to inspect the processed image.
  • Customizable: Can be configured via HTML attributes.
  • Theme support: Light and dark modes available.
  • Internationalization: Support for multiple languages.

Usage

From CDN

The easiest way to use the component is by importing it directly from a CDN in your HTML file.

<background-remover></background-remover>
<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@ligrila/[email protected]/dist/background-remover.es.js"
></script>

With a Bundler

If you are using a bundler like Vite or Webpack, you can install the component from npm:

# With pnpm
pnpm add @ligrila/background-remover

# With npm
npm install @ligrila/background-remover

Then, import it into your project:

import '@ligrila/background-remover';

And use it in your HTML:

<background-remover></background-remover>

Attributes

  • data-model: The Hugging Face model to use (default: briaai/RMBG-1.4).
  • data-device: The device to use for the model (webgpu, wasm, or cpu; default: webgpu).
  • data-theme: The theme to use (light, dark, or auto; default: auto).
  • data-label: The text to display in the upload area.
  • data-locale: The language to use (default: the browser's language).

Events

The component emits the following custom events:

  • @ligrila/background-remover/model-status: Fired when the model status changes.
  • @ligrila/background-remover/model-progress: Fired while the model is downloading.
  • @ligrila/background-remover/image-processed: Fired when an image has been processed.
  • @ligrila/background-remover/error: Fired when an error occurs.

Development

To develop locally, clone the repository and install the dependencies:

git clone https://github.com/lopezlean/ligrila-background-remover.git
cd ligrila-background-remover
pnpm install

Then, you can start the development server:

pnpm run dev

Scripts

  • pnpm run dev: Starts the Vite development server.
  • pnpm run build: Builds the component for production.
  • pnpm run preview: Previews the production build.
  • pnpm run lint:eslint: Lints the code for errors.

Contributions

Contributions are welcome. Please open an issue or a pull request to discuss changes.

License

This project is under the MIT license.