New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

untrusive

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

untrusive

> This project is built by [path_of_dev](https://pathof.dev)

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
206
decreased by-1.44%
Maintainers
1
Weekly downloads
 
Created
Source

⌛ Untrusive

This project is built by path_of_dev

Untrusive is a indeterminate loading bar for websites and web applications. It features:

  • Zero-dependencies
  • Lightweight, only 1.2kb gzipped
  • Minimal API
  • No CSS import required
  • Safe to import server-side
  • Includes TypeScript definitions

View demo

Installing

Install via CDN

Add the following script tag to your HTML before using this library

<script src="https://cdn.jsdelivr.net/npm/untrusive@1.0.0/dist/umd/untrusive.min.js"></script>

Install via NPM

npm install --save untrusive

Usage

Untrusive is a class which you can create multiple instances of.

import Untrusive from "untrusive"; // only for NPM installation

const loader = new Untrusive({
  bgColor: "#333", // Background color
  barColor: "#222", // Animated stripe color
  height: 4, // Optional: Height of bar in pixels 
});

loader.start();

loader.stop();

loader.toggle();

// Re-initalize instance with new options
loader.init({
  bgColor: "#333",
  barColor: "#222",
});

Untrusive Options

Takes an object with the following properties:

PropertyTypeDescription
bgColorstringBackground color of the loading bar. Can be any valid CSS color
bgColorstringColor of the animated stripe on the loading bar. Can be any valid CSS color
heightnumberHeight of the loading bar in pixels, defaults to 4

Contributing

If you would like to contribute to this project, you need to:

  1. Fork the GitHub repo
  2. Make the required changes on your fork
  3. Submit a pull request in this repo comparing your fork

Keywords

FAQs

Package last updated on 07 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc