bytespin

2.0.7 • Public • Published

bytespin

npm version npm

spinner nanocomponent that cycles through a given list of characters ( demo )

installation

npm install --save bytespin

usage

spinner = Spinner(opts) creates a new Spinner instance.

{
  chars: string  // characters to cycle through
  speed: number // spinning speed in ms
}

example

var Spinner = require('bytespin')
var spinner = Spinner({ chars: '\\|/-', speed: 125 })
 
function view (state, emit) {
  return `
    <div>
      ${spinner.render(state.fetching)}
    </div>`
}

Readme

Keywords

Package Sidebar

Install

npm i bytespin

Weekly Downloads

3

Version

2.0.7

License

Apache-2.0

Unpacked Size

54 kB

Total Files

6

Last publish

Collaborators

  • kareniel