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

virtual-dom loading dots component
Currently usable. API is a work in progress and will change
To Install
$ npm install --save virtual-loading-dots
Usage
// TODO: Example usage
For now use the demo folder as an example
View the component in a browser using npm run demo
API
LoadingDots(dotColor, widthEM, parentBackgroundColor, borderRadius)
-> object
dotColor
Required
Type: string
The color of your dots
widthEM
Required
Type
: number
Width of your entire loading dots component in em
parentBackgroundColor
Required
Type: string
The background color of whatever element that you're putting this spinner inside of.
This is currently required because the loading spinners are actually the color of your
backgroundColor
, and their shadows are the color of your dotColor
Ideally the loading spinner would be transparent. Need to figure out a better animation
borderRadius
Required
Type: string
0%
for squares, 50%
for circles, anything in between for a hybrid shape
Returned Value
Returns an object that exposes a .render
function
TODO:
- Accomplish animation without needing to know a background color (i.e. the dots are transparent)
- Accomplish animation without needing to know a width (i.e. using percentages)
- Defaults for dotColor, width, and borderRadius
- potentially allow consumer to specify units (
em
,px
, etc) - Allow dots to interpolate between two colors
- Add a few different
loadingDots
to demo
See Also
License
MIT