loading-bars

0.0.1 • Public • Published

loading-bars

Loading bars like Gmail and other Google apps for Android.

Demo: http://AndersDJohnson.github.io/loading-bars/example/index.html

Install

Install with bower:

$ bower install --save loading-bars

Install with npm:

$ npm install --save loading-bars

Use

Include src/bars.js on your page.

Simple

var bars = new Bars();
bars.start();
 

Custom colors

var bars = new Bars(['red', 'orange', 'yellow', 'green', 'blue', 'purple']);
bars.start();
 

Options

You can pass an options object to new Bars( { /* ... */ } ).

Here are more options - the current defaults:

{
  /* you can provide an animation function in format of jQuery Easing (http://gsgd.co.uk/sandbox/jquery/easing/*/
  progressFn: easeOutQuad,
  /* control the frame rate */
  frameRate: 60,
  /* spread factor - not recommended to change */
  spreadFactor: 3,
  /* control the animation speed */
  secondsPerLoop: 2,
  /* these are the bar colors */
  bars: ['#008844', '#ee0000', '#0066ff', '#ffcc00'],
  /* the parent element to attach to */
  parent: document.body
}

Inspiration

Readme

Keywords

none

Package Sidebar

Install

npm i loading-bars

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

9.4 kB

Total Files

8

Last publish

Collaborators

  • adjohnson916