SkillAgentSearch skills...

Baaar

a colorful top loading progress bar

Install / Use

/learn @jonathanong/Baaar
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Baaar

A lightweight progress bar for loading pages. Similar to nanobar except:

  • Supports colors!
  • Uses 2D transforms
  • A component

Demo: https://cdn.rawgit.com/component/baaar/master/demo.html

API

var bar = new Baaar([target])

Optional target, otherwise the element is appended to the body.

bar.set([percent], [color])

Set a percent between 0 and 100 or set a color as a String. If the bar has not been created, creates a bar.

var bar = new Baaar()

// initializes the bar
bar.set(1, 'red')
bar.outie.id = 'something-unique'

bar.destroy()

Fades the bar out and removes the element from the DOM.

bar.outie, bar.innie

The elements, if they exist. If they don't exist, use .set() and they will be created.

Extending

The default styles are in defaults.css. You should probably override them.

Browser Support

IE9+. Should work with older browsers if you use polyfills for the following:

  • Array.prototype.forEach()
  • requestAnimationFrame()
View on GitHub
GitHub Stars24
CategoryDevelopment
Updated10y ago
Forks0

Languages

JavaScript

Security Score

75/100

Audited on Nov 22, 2015

No findings