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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@ecohead/kondonizer

v0.1.0

Published

🗂 A universal media library web component based on the Custom Elements standard.

Readme

Kondonizer : Universal Media Library as a Web Component.

Open Source Love svg1 Awesome Badges TypeScript Npm Twitter Support Server

npm NPM npm bundle size

Maintenance PRs Welcome

Support Server

Kondonizer

Kondonizer is a custom element (a native HTML tag) that can be integrated in any frontend code. It displays a media library based on a Media model, like WordPress does internally. You can select, upload, edit and delete one or multiple files, all based on a configuration object highly customizable.

This web component needs between 2 and 5 API endpoints to be fully working. More info in the documentation.

Documentation

The full documentation is accessible in a dedicated website.

Installation

You can use your preferred package manager.

npm

npm install @ecohead/kondonizer --save

yarn

yarn add @ecohead/kondonizer --save

pnpm

pnpm install @ecohead/kondonizer --save

Configuration

Add the custom-element to your page

The first step is to place the HTML tag where you need it in your template :

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title></title>
</head>
<body>
  <!-- Calls the custom-element -->
  <eco-kondonizer></eco-kondonizer>
</body>
</html>

At this point, you will see any changes, because you need to create an instance of kondonizer to actually display the component UI.

Create a new instance of the component

The eco-kondonizer custom element provide a method to create a new instance with some options. To display the component UI, you need to create a new instance as follows :

  // At the top of the file
  import { EcoKondonizer, defineConfig } from "@ecohead/kondonizer";

  // Anywhere in the same file
  const kondonizer = document.querySelector('eco-kondonizer');

  if (!kondonizer) return;

  kondonizer.createInstance({
    // Create default options, but necessary to be customized
    config: defineConfig(),
    // Pass [] to no existing selection, or an array of ids (e.g. [12,28,46])
    selectedMedias: [],
    // Defaults to 'en-US'
    defaultLang: 'fr-FR'
  });

Note All the options available are listed here.

Warning Some config options are required (e.g. server endpoints), so you need to pass a correct config to view the component UI.

Listen to selection confirmation

A CustomEvent is emitted each time the user clicks on the confirm button in the modal. So, to get the user selection, you have to listen to this event as follows :

  kondonizer.addEventListener('kondoupdate', (e) => {
    console.log(e.detail)
  });

  /**
   * Outputs :
   * {
   *    identifier: 'some-uuid', // Unique identifier of the instance
   *    selection: [12,24] // All media ids selected in the modal
   * }
   */

Et voilà !

You now have a fully functional web component that you can integrate in any of your templates.

If you need more details in the integration in the most popular front-end frameworks and libraries, see Integrate with front-end frameworks.

Preview

You can also have a working demo on the documentation website.

Kondonizer preview image

Credits

License

This library is MIT licensed.