JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q41822F
  • License MIT

Virtual-dom loading dots component

Package Exports

  • virtual-loading-dots

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (virtual-loading-dots) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

virtual-loading-dots npm version Build Status

virtual-dom loading dots component

View live demo

To Install

$ npm install --save virtual-loading-dots

Component is currently usable, but the API is a work in progress and will change

Usage

virtual-loading-dots works with virtual-dom, react, or any other DOM builder with a hyperscript style API: h(tagName, properties, children)

// TODO: Example usage

For now use the demo folder for example usage

# view the demo in a local browser by pasting this into your terminal:
git clone https://github.com/chinedufn/virtual-loading-dots && cd virtual-loading-dots && npm install && npm run demo

API

LoadingDots.render(h[, opts]) -> vtree

h

Your hyperscript style DOM builder.

// standalone virtual-dom example
var h = require('virtual-dom/h')
// React example
h = require('react').h

Options

Pass in any options that you would like to override

animation

Type: string

Default: see the return value of insert-animation

The animation for your dots

borderRadius

Type: number or string

Default: 50

0 for squares, 50 for circles, anything in between for a hybrid shape

color

Type: string

Default: 'black'

The color of your dots in css color notation

count

Type: number

Default: 3

The number of dots

delay

Type: number

Default: .16

The animation-delay between each neighboring dot

TODO:

  • Document options
  • Allow dots to interpolate between two colors
  • Add a few different loadingDots usage examples
  • Add documentation to stress importance of framework agnostic components
  • Research React and update the React example
  • Maybe add .jsx and hyperx examples

See Also

License

MIT