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

appblocks

v2.1.1

Published

A lightweight javascript library for building micro apps for the front-end.

Readme

AppBlocks

A tiny, fast, and lightweight JavaScript library for building micro applications

AppBlocks is designed to enhance web pages with self-contained micro applications. With a focus on simplicity and minimal footprint, AppBlocks provides everything needed to build interactive components while being ridiculously easy to integrate into any project.

Why AppBlocks?

  • 🪶 Lightweight: Minimal bundle size with no heavy dependencies
  • ⚡ Fast: Efficient rendering with smart DOM diffing (Idiomorph)
  • 🎯 Focused: Built specifically for micro apps and widgets
  • 📦 Zero Config: Works out of the box with a simple script tag
  • 🔧 Flexible: Template-based with reactive data binding

Read more about the AppBlocks use case.

Quick Start

Here's a complete "Hello World" app in under 30 lines:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>My First AppBlock</title>
</head>
<body>
  <!-- Container where our app will render -->
  <div id="app"></div>

  <!-- Template with our app's markup -->
  <template id="appTemplate">
    <h1>{data.message}</h1>
    <button id="change-btn">Change Message</button>
  </template>

  <!-- Load AppBlocks from CDN -->
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/appblocks.min.js"></script>

  <!-- Initialize the app -->
  <script>
    var app = new AppBlock({
      el: document.getElementById('app'),
      template: document.getElementById('appTemplate'),
      data: {
        message: "Hello, AppBlocks!"
      },
      events: {
        'click #change-btn': function() {
          this.Parent.setData({
            message: "You clicked the button!"
          });
        }
      }
    });
  </script>
</body>
</html>

Installation

CDN (Recommended for Quick Start)

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/appblocks.min.js"></script>

NPM

npm install appblocks

Then import in your JavaScript:

import { AppBlock } from 'appblocks';

Direct Download

Download the latest release and include it in your HTML:

<script src="/path/to/appblocks.min.js"></script>

Core Features

📊 Reactive Data Binding

var app = new AppBlock({
  el: document.getElementById('app'),
  data: { count: 0 },
  // ...
});

// Update data and automatically re-render
app.setData({ count: 1 });

🎨 Template Directives

<!-- Conditional rendering -->
<p c-if="data.isVisible">Now you see me</p>
<p c-ifnot="data.isVisible">Now you don't</p>

<!-- Loop rendering -->
<ul>
  <li c-for="item in data.items">{item.name}</li>
</ul>

🔄 Filters

filters: {
  uppercase(app, value) {
    return value.toUpperCase();
  }
}
<p>{data.name|uppercase}</p>

🎯 Event Handling

events: {
  'click .btn': function(e, element) {
    this.Parent.setData({ clicked: true });
  },
  'submit form': function(e, element) {
    e.preventDefault();
    // Handle form submission
  }
}

🌐 Built-in HTTP Requests

app.fetchRequest('https://api.example.com/data',
  { method: 'GET' },
  {
    success: (data) => app.setData({ items: data }),
    error: (err) => console.error(err)
  }
);

Documentation

📚 Full Documentation

Browser Support

AppBlocks works in all modern browsers that support ES6:

  • Chrome/Edge (latest)
  • Firefox (latest)
  • Safari (latest)
  • Opera (latest)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details