@manz/pageload

1.0.2 • Public • Published

PageLoad.js

npm GitHub file size in bytes Libraries.io dependency status for latest release

Small vanilla javascript library 3.5KB (~1.4KB gzipped) for easy and simple page loading spinner. Ready for ES Modules. Agnostic. Zero dependencies.

Basic Usage

1. Vía NPM

npm install pageload
import PageLoad from "pageload";
PageLoad.start({ fakeMode: true });

2. Vía CDN

<script type="module">
  import PageLoad from "//unpkg.com/pageload";
  PageLoad.start({ fakeMode: true });
</script>
  • fakeMode mode run a slow progress bar

Custom Usage

FadeIn until completed

import PageLoad from "//unpkg.com/pageload";
PageLoad.start({
  autoIncrement: true,
  color: "mediumpurple",
  fadeIn: true
});

Progress bar on dark mode

import PageLoad from "//unpkg.com/pageload";
document.body.style.backgroundColor = "black";
PageLoad.start({
  fakeMode: true,
  backgroundColor: "#222",
  color: "#c00",
  spinBarColor: "#ccc",
  enableProgress: true
});

More info about pageload and options.

Package Sidebar

Install

npm i @manz/pageload

Weekly Downloads

9

Version

1.0.2

License

MIT

Unpacked Size

6.75 kB

Total Files

3

Last publish

Collaborators

  • manz