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

@softon/loader

v1.0.2

Published

Softon Loader - Lightweight JavaScript loading overlay with circular progress indicator.

Readme

@softon/loader

npm license downloads

Lightweight JavaScript loading spinner for HTML, React, Vue and Node applications.

Loader.js

A lightweight, dependency-free JavaScript loading indicator that works for both full-page overlays and specific HTML elements.

Installation

npm

npm install @softon/loader

ES Module

import Loader from "@softon/loader";

Features

  • 🚀 Pure JavaScript (No dependencies)
  • 🎨 Customizable spinner size and color
  • 🌗 Optional overlay background
  • 📦 Lightweight and reusable
  • 🖥️ Full-page loading indicator
  • 📄 Element-specific loading indicator
  • ⚡ Easy to integrate with Fetch, Axios, jQuery, or any JavaScript project

Installation

Using jsDelivr CDN

<script src="https://cdn.jsdelivr.net/npm/@softon/loader/dist/loader.min.js"></script>

Or download

Download loader.js and include it in your project.

<script src="loader.js"></script>

Basic Usage

Full-page Loader

Loader.show();

setTimeout(() => {
    Loader.hide();
}, 2000);

Loader Inside a Specific Element

<div id="content">
    Loading content...
</div>
Loader.show({
    targetId: "content"
});

setTimeout(() => {
    Loader.hide("content");
}, 2000);

Customization

Loader.show({
    targetId: "content",
    size: 60,
    color: "green",
    overlay: true,
    background: "rgba(255,255,255,0.6)"
});

API

Loader.show(options)

Displays a loading spinner.

Options

| Option | Type | Default | Description | | ------------ | ------- | ------------------------ | ------------------------------------------------------------------ | | targetId | String | null | ID of the target element. If omitted, a full-page loader is shown. | | size | Number | 40 | Spinner size in pixels. | | color | String | "#0d6efd" | Spinner color. | | overlay | Boolean | true | Show or hide the overlay background. | | background | String | "rgba(255,255,255,.5)" | Overlay background color. |

Example:

Loader.show({
    color: "red",
    size: 50
});

Loader.hide(targetId)

Hides the loader.

Hide Full-page Loader

Loader.hide();

Hide Element Loader

Loader.hide("content");

Axios Example

Loader.show();

axios.get("/api/users")
    .then(response => {
        console.log(response.data);
    })
    .catch(error => {
        console.error(error);
    })
    .finally(() => {
        Loader.hide();
    });

Fetch Example

Loader.show({
    targetId: "content"
});

fetch("/api/users")
    .then(response => response.json())
    .then(data => {
        console.log(data);
    })
    .finally(() => {
        Loader.hide("content");
    });

Browser Support

  • Chrome
  • Edge
  • Firefox
  • Safari
  • Opera

License

MIT License

Feel free to use, modify, and distribute this project.


Contributing

Contributions, bug reports, and feature requests are welcome.

If you find an issue or have an idea for improvement, please open an issue or submit a pull request.


Author

Developed and maintained by LNT Softwares.